summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau/i2c: introduce locking at a per-port levelBen Skeggs2014-06-1114-34/+380
| | | | | | | | | | 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-114-14/+56
| | | | | | | | | | | 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-116-6/+79
| | | | 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-114-0/+94
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: start hiding subdev-internal interfacesBen Skeggs2014-06-1121-236/+194
| | | | 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-114-14/+20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-/mc: also pass PMGR interrupts onto I2C subdevBen Skeggs2014-06-113-3/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: send separate event types for high/low transitionsBen Skeggs2014-06-114-14/+17
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: use base constructor for all implementationsBen Skeggs2014-06-118-119/+47
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: move on-reset intr disable-and-ack to common codeBen Skeggs2014-06-117-138/+80
| | | | | | | Re-uses the implementation's accessor functions rather than requiring and init/fini implementation for each chipset. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: split "toggled" interrupt into "went high" / "went low"Ben Skeggs2014-06-117-114/+156
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: split g92 class from nv50Ben Skeggs2014-06-1111-58/+110
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: use indirect pointer to base class definitionBen Skeggs2014-06-1113-75/+75
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/dp: support training to highest rate, rather than a targetBen Skeggs2014-06-111-23/+34
| | | | | | We really want this for, at least, MST devices. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/dp: support postcursor in link trainingBen Skeggs2014-06-112-11/+53
| | | | | | | Not enabled at the backends yet, but will read status and send back max reached at level 0. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: allow event source to handle multiple event types per indexBen Skeggs2014-06-1121-77/+112
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/gk208/gr: add missing registers to grctx initIlia Mirkin2014-06-101-0/+2
| | | | | | | | | This fixes hangs on GK208 which happen instantaneously on trying to use a geometry shader. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org # v3.14+
* drm/nouveau/kms/nv04-nv40: fix pageflip events via special case.Mario Kleiner2014-06-101-2/+8
| | | | | | | | | | | | | | Cards with nv04 display engine can't reliably use vblank counts and timestamps computed via drm_handle_vblank(), as the function gets invoked after sending the pageflip events. Fix this by defaulting to the old crtcid = -1 fallback path on <= NV-50 cards, and only using the precise path on NV-50 and later. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: <stable@vger.kernel.org> # 3.13+
* drm/nv50-/mc: fix kms pageflip events by reordering irq handling order.Mario Kleiner2014-06-103-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever a single nouveau_mc_intr() main gpu irq-handler invocation was responsible for calling both, the vblank-irq handler (display engine irq) and kms-pageflip completion handler (from fifo irq), the order of invocation was wrong. nouveau_finish_flip() was called before drm_handle_vblank() for the vblank of pageflip completion, so the emitted pageflip event contained stale vblank count and timestamp from previous vblank. This caused failure in userspace to timestamp properly. Reorder order of invocation of engine irq handlers: Put NVDEV_ENGINE_DISP always on top, and thereby before NVDEV_ENGINE_FIFO, so that drm_handle_vblank() gets called to update vblank timestamps and count before potential pageflip events make use of that information. This works on nv-50 and later, where kms-pageflip completion triggers an irq either after a separate vblank irq, or both pageflip and vblank trigger one common irq invocation, but never before vblank irqs. v2 (Ben): - removed mods for nv04-nv40, it doesn't help there anyway - this is considered a hack, and a better solution should be found Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: <stable@vger.kernel.org> # 3.13+
* drm/nouveau/disp/nv04-nv40: abort scanoutpos query on vga analog.Mario Kleiner2014-06-101-0/+8
| | | | | | | | | | | | | nv04_disp_scanoutpos() must abort to trigger simple timestamping fallback if vtotal/htotal regs return zero. This happens if the output isn't a digital output, but a vga analog output, as the regs don't get initialized in that case. Fixes timestamping failure on nv-40 and earlier with vga output. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: <stable@vger.kernel.org> # 3.14+
* drm/nv50-/kms: wait for enough ring space in crtc_prepare()Ben Skeggs2014-06-101-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/dp: support training pattern 3Ben Skeggs2014-06-102-2/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/dp: support aux read interval during link trainingBen Skeggs2014-06-102-6/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/gk104/gpio: fix incorrect interrupt register usageBen Skeggs2014-06-101-5/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: punt all object state change messages to trace levelBen Skeggs2014-06-101-5/+5
| | | | | | Leave debug for the more interesting bits of info. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clk: allow end-user reclocking for nv40, nvaa, and nve0 clock typesIlia Mirkin2014-06-109-12/+23
| | | | | | | Use with caution. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb: default NvMemExec to on, turning it off is used for ↵Ilia Mirkin2014-06-104-4/+4
| | | | | | | debugging only Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: fix a potential NULL deref in the PROM shadowing functionMartin Peres2014-06-101-4/+5
| | | | | | Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: bump the i2c delay for the adt7473Martin Peres2014-06-101-3/+3
| | | | | | | | Some adt7473 can't manage the 20µs delay we use for the bitbanging, bumping it to 40µs seem to do the trick. Signed-off-by: Martin Peres <martin.peres@free.fr> Tested-by: Marcel Dopita <mdop@seznam.cz>
* drm/nouveau/therm/fan/tach: default to 2 pulses per revolutionMartin Peres2014-06-101-1/+1
| | | | | | | | | | | | | | | I spent some time this weekend trying to find in the vbios the number of pulses per revolutions in the vbios but couldn't find it. It would seem all my cards have 2 pulses per revolution so let's stick to that until further notice. Thermal table's id 0x48 may indicate this information but it would seem that changing the value results in the blob power or clock gating the RPM counter... We should ask NVIDIA about that, should be trivial-enough for them to answer. Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvf0/device: enable video decoding engines on gk110/gk208John Rowley2014-06-101-6/+0
| | | | | | | Only tested on nvf1, was advised to enable on all. Signed-off-by: John Rowley <john.rowley08@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvf1/device: add support for 0xf1 (gk110b)John Rowley2014-06-101-0/+35
| | | | | Signed-off-by: John Rowley <john.rowley08@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/device: support for probing GK20AAlexandre Courbot2014-06-101-0/+17
| | | | | | | Set the correct subdev/engine classes when GK20A (0xea) is probed. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/graph: add GK20A supportAlexandre Courbot2014-06-108-9/+123
| | | | | | | | | | | Add a GR device for GK20A based on NVE4, with the correct classes definitions (GK20A's 3D class is 0xa297). Most of the NVE4 code can be used on GK20A, so make relevant bits of NVE4 available to other chips as well. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/graph: pad firmware code at load timeAlexandre Courbot2014-06-101-0/+4
| | | | | | | | | Pad the microcode to a multiple of 0x40 words, otherwise firmware will fail to run from non-prepadded firmware files. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/graph: enable when using external fwAlexandre Courbot2014-06-101-3/+7
| | | | | | | | | | | | | | | | nvc0_graph_ctor() would only let the graphics engine be enabled if its oclass has a proper microcode linked to it. This prevents GR from being enabled at all on chips that rely exclusively on external firmware, even though such a use-case is valid. Relax the conditions enabling the GR engine to also include the case where an external firmware has also been loaded. Also switch to external firmware if the graph class has no microcode linked to it. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo: add GK20A supportAlexandre Courbot2014-06-104-0/+38
| | | | | | | | | GK20A's FIFO is compatible with NVE0, but only features 128 channels and 1 runlist. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb: add GK20A supportAlexandre Courbot2014-06-105-0/+212
| | | | | | | | Add a simple FB device for GK20A, as well as a RAM implementation suitable for chips that use system memory as video RAM. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/ibus: add GK20A supportAlexandre Courbot2014-06-103-0/+105
| | | | | | | | Add support for initializing the priv ring of GK20A. This is done by the BIOS on desktop GPUs, but needs to be done by hand on Tegra. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/bar: support chips without BAR3Alexandre Courbot2014-06-101-55/+59
| | | | | | | | | | Adapt the NVC0 BAR driver to make it able to support chips that do not expose a BAR3. When this happens, BAR1 is then used for USERD mapping and the BAR alloc() functions is disabled, making GPU objects unable to rely on BAR for data access and falling back to PRAMIN. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bar: only ioremap BAR3 if it existsAlexandre Courbot2014-06-101-2/+4
| | | | | | | | | | Some chips that use system memory exclusively (e.g. GK20A) do not expose 2 BAR regions. For them only BAR1 exists, and it should be used for USERD mapping. Do not map BAR3 if its resource does not exist. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/doc: Fix nouveau typoDamien Lespiau2014-06-101-1/+1
| | | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge tag 'drm/panel/for-3.16-rc1' of ↵Dave Airlie2014-06-109-0/+149
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/tegra/linux into drm-next drm/panel: Changes for v3.16-rc1 This set of commits contains a couple of fixes to existing panel drivers and support for some new panels. One commit touches the DRM core in that in modifies the MIPI DSI support to hook up the shutdown function so that drivers can provide code that's run on shutdown. This is used by a subsequent commit to make the simple panel driver power off the backlight on shutdown. * tag 'drm/panel/for-3.16-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/panel: simple - Add AUO B133XTN01 panel support drm/panel: simple - Disable panel on shutdown drm/panel: add support for EDT ET057090DHU panel drm/panel: Add support for EDT ETM0700G0DH6 and ET070080DH6 panels drm/panel: ld9040: add power control sequence drm/panel: s6e8aa0: silence array overflow warning drm/dsi: Support device shutdown
| * drm/panel: simple - Add AUO B133XTN01 panel supportStéphane Marchesin2014-06-092-0/+32
| | | | | | | | | | | | | | | | | | This panel is used by nyan-big and can be supported by the simple-panel driver. Signed-off-by: Stéphane Marchesin <marcheu@chromium.org> [treding@nvidia.com: add device tree binding document] Signed-off-by: Thierry Reding <treding@nvidia.com>
| * drm/panel: simple - Disable panel on shutdownThierry Reding2014-06-051-0/+19
| | | | | | | | | | | | | | When a device is shut down, disable the panel to make sure the display backlight doesn't stay lit. Signed-off-by: Thierry Reding <treding@nvidia.com>
| * drm/panel: add support for EDT ET057090DHU panelStefan Agner2014-06-052-0/+33
| | | | | | | | | | | | | | | | This panel is sold by Toradex for Colibri T20/T30 and Apalis T30 evaluation kits. Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * drm/panel: Add support for EDT ETM0700G0DH6 and ET070080DH6 panelsPhilipp Zabel2014-06-053-0/+49
| | | | | | | | | | | | | | | | The EDT ETM0700G0DH6 and ET070080DH6 are 7" 800x480 panels, which can be supported by the simple panel driver. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Thierry Reding <treding@nvidia.com>
| * drm/panel: ld9040: add power control sequenceAndrzej Hajda2014-06-051-0/+3
| | | | | | | | | | | | | | | | | | Some ld9040 panels do not start without providing power control sequence during initialization. The patch fixes the driver by providing such sequence for all panels. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
OpenPOWER on IntegriCloud