summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/subdev/i2c
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: remove symlinks, move core/ to nvkm/ (no code changes)Ben Skeggs2015-01-2220-2870/+0
| | | | | | | | | | | | The symlinks were annoying some people, and they're not used anywhere else in the kernel tree. The include directory structure has been changed so that symlinks aren't needed anymore. NVKM has been moved from core/ to nvkm/ to make it more obvious as to what the directory is for, and as some minor prep for when NVKM gets split out into its own module (virt) at a later date. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: pad/ports do not have an engineBen Skeggs2015-01-2210-27/+27
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: fix some blatant abuseBen Skeggs2015-01-222-3/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: add support for DCB_I2C_PMGR port typeBen Skeggs2014-12-021-0/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/gm204/i2c: add aux channel driverBen Skeggs2014-12-025-3/+231
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/gm204/i2c: add pad driverBen Skeggs2014-12-022-0/+87
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: segregate aux channel adapter indices from bit-banged i2cBen Skeggs2014-12-021-2/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: store aux addr independently of i2cBen Skeggs2014-12-022-32/+51
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-/i2c: kill some unused struct membersBen Skeggs2014-12-023-15/+0
| | | | | | Left-over from before a rework a while back. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: pass related object into notify constructorBen Skeggs2014-09-151-1/+3
| | | | | | The event source types/index might need to be derived from it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: rework event interfaceBen Skeggs2014-08-101-11/+34
| | | | | | | | | | | | | | | This is a lot of prep-work for being able to send event notifications back to userspace. Events now contain data, rather than a "something just happened" signal. Handler data is now embedded into a containing structure, rather than being kmalloc()'d, and can optionally have the notify routine handled in a workqueue. Various races between suspend/unload with display HPD/DP IRQ handlers automagically solved as a result. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/gf117/i2c: no aux channels on this chipsetBen Skeggs2014-06-181-0/+39
| | | | | Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c/anx9805: add debugging to aux transactionsBen Skeggs2014-06-112-5/+34
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: introduce locking at a per-port levelBen Skeggs2014-06-1112-31/+372
| | | | | | | | | | There's also provisions to allow a pad to be locked with a specific routing, for an indefinite period of time. This will be used in future patches. The G94+ pad driver will now also power-down pads when not required. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: balance port acquire/releaseBen Skeggs2014-06-113-14/+54
| | | | | | | | | | | This was a half-finished hack before, just enough to handle the shared aux/i2c pad thing on G94 and up. We got lucky with locking etc up until now, as this was (generally) all protected by the DRM mode_config lock. It's about to become a lot more likely to hit the races. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/gk104/i2c: add aux channel interrupt driverBen Skeggs2014-06-113-1/+72
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/g94/i2c: add aux channel interrupt driverBen Skeggs2014-06-113-0/+39
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: add interfaces to support handling aux channel interruptsBen Skeggs2014-06-113-0/+81
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: start hiding subdev-internal interfacesBen Skeggs2014-06-1111-119/+124
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: remove unnecessary i2c_set_adapdata()Ben Skeggs2014-06-111-2/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: properly hand aux reply back to caller, and only retry on deferBen Skeggs2014-06-113-13/+19
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* support for platform devicesAlexandre Courbot2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | Upcoming mobile Kepler GPUs (such as GK20A) use the platform bus instead of PCI to which Nouveau is tightly dependent. This patch allows Nouveau to handle platform devices by: - abstracting PCI-dependent functions that were typically used for resource querying and page mapping, - introducing a nv_device_is_pci() function that allows to make PCI-dependent code conditional, - providing a nouveau_drm_platform_probe() function that takes a GPU platform device to be probed. Core code as well as engine/subdev drivers are updated wherever possible to make use of these functions. Some older drivers are too dependent on PCI to be properly updated, but all newer code on which future chips may depend should at least be runnable with platform devices. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix null ptr dereferences on some boardsBen Skeggs2014-01-151-2/+2
| | | | | | | | Regression from "device: populate master subdev pointer only when fully constructed" Reported-by: Bob Gleitsmann <rjgleits@bellsouth.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: use a custom bitbanging delay for the adt7473Martin Peres2013-11-081-5/+22
| | | | | | | | This patch adds a way to define a custom delay when scanning for i2c devices because the adt7473 sometimes doesn't like the default bitbanging udelay. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: pass the function pointers in at creation timeIlia Mirkin2013-09-047-18/+18
| | | | | | | | | | | | | i2c_bit_add_bus can call the pre_xfer function, which expects the func pointer to be set. Pass in func to the port creation logic so that it is set before i2c_bit_add_bus. See https://bugs.freedesktop.org/show_bug.cgi?id=68456 Reported-by: Hans-Peter Deifel <hpdeifel@gmx.de> Tested-by: Hans-Peter Deifel <hpdeifel@gmx.de> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: remove parent deref hackBen Skeggs2013-04-261-5/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: drop parent refcount when creating portsBen Skeggs2013-03-041-0/+1
| | | | | | | | Fixes issue where i2c subdev never gets destroyed due to its subobjects holding references. This will mean the i2c subdev refcount goes negative during its destruction, but this isn't an issue in practice. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: add support for ddc/aux, and dp link training on anx9805Ben Skeggs2013-02-202-1/+327
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: create proper chipset-specific class implementationsBen Skeggs2013-02-209-307/+911
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: extend type to 16-bits, add lookup-by-type functionBen Skeggs2013-02-201-0/+14
| | | | | | | | For off-chip transmitters we won't necessarily have an i2c table entry to lookup, but we can do it instead by encoding the type to include the extdev type and looking that up instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: aux channels not necessarily on nvioBen Skeggs2013-02-203-148/+187
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: fix a bit of a thinko in nv_wri2cr helper functionsBen Skeggs2013-02-201-4/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: handle i2c/aux mux outside of port lookup functionBen Skeggs2013-02-202-21/+36
| | | | | | | | Not quite how I want it yet, but, I'll fix that at some point. For right now, it's needed because find() won't necessarily be used right before a transaction anymore. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: prevent log manglingDaniel J Blueman2012-11-291-1/+1
| | | | | | | | | On 3.7-rc6, add missing newline to to prevent the following kernel log line getting appended to the current one after switching the integrated GPU and suspending the discrete GPU. Signed-off-by: Daniel J Blueman <daniel@quora.org> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: fix typo when checking nvio i2c port validityBen Skeggs2012-10-311-1/+1
| | | | | | Reported-by: Mathieu Chouquet-Stringer <mathieu@csetco.com> Tested-by: Mathieu Chouquet-Stringer <mathieu@csetco.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: port to subdev interfacesBen Skeggs2012-10-033-267/+722
| | | | | | | | | | | v2/v3: Ben Skeggs <bskeggs@redhat.com> - fix typo in default bus selection - fix accidental loss of destructor v4: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> - fix typo causing incorrect default i2c port settings when no BMP data Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: port gpio to subdev interfacesBen Skeggs2012-10-031-1/+1
| | | | | | | v2: Ben Skeggs <bskeggs@redhat.com> - rebase on top of v3.6-rc6 with gpio reset patch integrated already Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: restructure source tree, split core from drm implementationBen Skeggs2012-10-031-0/+394
Future work will be headed in the way of separating the policy supplied by the nouveau drm module from the mechanisms provided by the driver core. There will be a couple of major classes (subdev, engine) of driver modules that have clearly defined tasks, and the further directory structure change is to reflect this. No code changes here whatsoever, aside from fixing up a couple of include file pathnames. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>