Commit graph

761 commits

Author SHA1 Message Date
Maarten Lankhorst 242a42eadf drm/nouveau/disp: fix oops in destructor with headless cards
If init doesn't run then disp->outp might not be initialized, resulting
in an oops.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-18 15:49:50 +10:00
Ben Skeggs 82c2b5ed6f drm/gf117/i2c: no aux channels on this chipset
Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-18 15:49:50 +10:00
Ben Skeggs c15ad3ca32 drm/nouveau/pwr: fix typo in fifo wrap handling
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17 14:41:41 +10:00
Ben Skeggs ba5e01b0d0 drm/nv50/disp: fix a potential oops in supervisor handling
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17 14:41:41 +10:00
Ben Skeggs cf7c5d67e1 drm/nouveau/disp/dp: don't touch link config after success
I don't know of anything this fixes, but it seems wrong anyway.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17 14:41:41 +10:00
Ben Skeggs 86899b39b5 drm/gk104/fb/ram: fixups from an earlier search+replace
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17 14:41:40 +10:00
Pierre Moreau 0c9483b28b drm/nv50/gr: remove an unneeded write while initialising PGRAPH
The blob does not seem to write at that place for my NVAC, though it
does for my NV96, agreeing with what is done in the if/else structure
below. I guess someone forgot to remove the line when the if/else was
put in place.

Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17 14:41:40 +10:00
Pierre Moreau c03d082488 drm/nv50/gr: fix overlap while zeroing zcull regions
The specified stride was not correct, resulting in erases overlapping
and part of the zcull regions being not erased at all.

Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17 14:41:40 +10:00
Ben Skeggs 23f67841e5 drm/gf100-/gr: report class data to host on fwmthd failure
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17 14:41:40 +10:00
Ben Skeggs 0892a5f2bf drm/gk104/ibus: increase various random timeouts
Fixes (at least) PTHERM accesses timing out at higher clock speeds.

Values and registers taken from what the binary driver does.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17 14:41:40 +10:00
Ben Skeggs 1968a1e904 drm/gk104/clk: only touch divider for mode we'll be using
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-17 14:41:40 +10:00
Dave Airlie bc1dfff04a Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
display rework fixes lots of displayport issues.

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (43 commits)
  drm/nouveau/disp/dp: fix tmds passthrough on dp connector
  drm/nouveau/dp: probe dpcd to determine connectedness
  drm/nv50-: trigger update after all connectors disabled
  drm/nv50-: prepare for attaching a SOR to multiple heads
  drm/gf119-/disp: fix debug output on update failure
  drm/nouveau/disp/dp: make use of postcursor when its available
  drm/g94-/disp/dp: take max pullup value across all lanes
  drm/nouveau/bios/dp: parse lane postcursor data
  drm/nouveau/dp: fix support for dpms
  drm/nouveau: register a drm_dp_aux channel for each dp connector
  drm/g94-/disp: add method to power-off dp lanes
  drm/nouveau/disp/dp: maintain link in response to hpd signal
  drm/g94-/disp: bash and wait for something after changing lane power regs
  drm/nouveau/disp/dp: split link config/power into two steps
  drm/nv50/disp: train PIOR-attached DP from second supervisor
  drm/nouveau/disp/dp: make use of existing output data for link training
  drm/gf119/disp: start removing direct vbios parsing from supervisor
  drm/nv50/disp: start removing direct vbios parsing from supervisor
  drm/nouveau/disp/dp: maintain receiver caps in response to hpd signal
  drm/nouveau/disp/dp: create subclass for dp outputs
  ...
2014-06-11 16:28:10 +10:00
Ben Skeggs 1ae5a62bb8 drm/nouveau/disp/dp: fix tmds passthrough on dp connector
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:11:47 +10:00
Ben Skeggs e32d68c9c7 drm/gf119-/disp: fix debug output on update failure
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:11:29 +10:00
Ben Skeggs c33ba689e5 drm/nouveau/disp/dp: make use of postcursor when its available
And at the same time, obey the spec better wrt out-of-range requests.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:11:28 +10:00
Ben Skeggs 3e1eb5cf7c drm/g94-/disp/dp: take max pullup value across all lanes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:11:19 +10:00
Ben Skeggs 7a14bc783e drm/nouveau/bios/dp: parse lane postcursor data
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:11:18 +10:00
Ben Skeggs ebd6acbb06 drm/g94-/disp: add method to power-off dp lanes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:57 +10:00
Ben Skeggs 55f083c33f drm/nouveau/disp/dp: maintain link in response to hpd signal
This previously worked for the most part due to userspace doing a
modeset in response to HPD interrupts.  This will allow us to
properly handle cases where sync is lost for other reasons, or if
userspace isn't caring.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:56 +10:00
Ben Skeggs 13a61757db drm/g94-/disp: bash and wait for something after changing lane power regs
Some kind of update?  Needed to make the power-down take effect at least.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:47 +10:00
Ben Skeggs 1ecee1cda3 drm/nouveau/disp/dp: split link config/power into two steps
We want to be able to power down the lanes for DPMS off.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:46 +10:00
Ben Skeggs b17932c01a drm/nv50/disp: train PIOR-attached DP from second supervisor
Same place as for SOR, between detach and attach phases.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:46 +10:00
Ben Skeggs 3b52a1f906 drm/nouveau/disp/dp: make use of existing output data for link training
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:45 +10:00
Ben Skeggs 2bd651ea43 drm/gf119/disp: start removing direct vbios parsing from supervisor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:45 +10:00
Ben Skeggs 415f12efc1 drm/nv50/disp: start removing direct vbios parsing from supervisor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:44 +10:00
Ben Skeggs bb7ef1ec2e drm/nouveau/disp/dp: maintain receiver caps in response to hpd signal
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:43 +10:00
Ben Skeggs b8407c9e50 drm/nouveau/disp/dp: create subclass for dp outputs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:43 +10:00
Ben Skeggs 7a014a8729 drm/nouveau/disp: add internal representaion of output paths and connectors
This will, at some point, be used to replace various bits and pieces of
code doing direct bios parsing.  For now, it'll just be used for some
DP improvements.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:36 +10:00
Ben Skeggs 20014cbe8b drm/nouveau/bios: extend connector table parsing
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:36 +10:00
Ben Skeggs 377b1f165c drm/nouveau/disp: nothing to see here
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:35 +10:00
Ben Skeggs 37da5b87ac drm/nouveau/i2c/anx9805: add debugging to aux transactions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:35 +10:00
Ben Skeggs 9efc583ea9 drm/nouveau/i2c: introduce locking at a per-port level
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>
2014-06-11 16:10:34 +10:00
Ben Skeggs d2ae2eb469 drm/nouveau/i2c: balance port acquire/release
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>
2014-06-11 16:10:33 +10:00
Ben Skeggs 0ff32977ea drm/gk104/i2c: add aux channel interrupt driver
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:33 +10:00
Ben Skeggs d78fa39a2b drm/g94/i2c: add aux channel interrupt driver
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:25 +10:00
Ben Skeggs 3668a339d6 drm/nouveau/i2c: add interfaces to support handling aux channel interrupts
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:16 +10:00
Ben Skeggs c26fe84356 drm/nouveau/i2c: start hiding subdev-internal interfaces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:15 +10:00
Ben Skeggs 0bac987984 drm/nouveau/i2c: remove unnecessary i2c_set_adapdata()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:15 +10:00
Ben Skeggs 842c2953fc drm/nouveau/i2c: properly hand aux reply back to caller, and only retry on defer
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:15 +10:00
Ben Skeggs febb844917 drm/nv50-/mc: also pass PMGR interrupts onto I2C subdev
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:15 +10:00
Ben Skeggs 20a8007485 drm/nouveau/gpio: send separate event types for high/low transitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:15 +10:00
Ben Skeggs bc3b0c41b1 drm/nouveau/gpio: use base constructor for all implementations
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:14 +10:00
Ben Skeggs f4277a0e42 drm/nouveau/gpio: move on-reset intr disable-and-ack to common code
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>
2014-06-11 16:09:14 +10:00
Ben Skeggs 5693c0f26f drm/nouveau/gpio: split "toggled" interrupt into "went high" / "went low"
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:14 +10:00
Ben Skeggs 7356859a29 drm/nouveau/gpio: split g92 class from nv50
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:14 +10:00
Ben Skeggs d93174ec39 drm/nouveau/gpio: use indirect pointer to base class definition
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:13 +10:00
Ben Skeggs 1f86ca1a2e drm/nouveau/disp/dp: support training to highest rate, rather than a target
We really want this for, at least, MST devices.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:13 +10:00
Ben Skeggs 04e7e92d53 drm/nouveau/disp/dp: support postcursor in link training
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>
2014-06-11 16:09:13 +10:00
Ben Skeggs 8e8832e8a8 drm/nouveau/core: allow event source to handle multiple event types per index
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:09:13 +10:00
Dave Airlie b06c47a13c Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
There's really not a great deal this time due to me spending most of this window on Maxwell.  But, here's the random bits and pieces that's currently queued.
* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (25 commits)
  drm/gk208/gr: add missing registers to grctx init
  drm/nouveau/kms/nv04-nv40: fix pageflip events via special case.
  drm/nv50-/mc: fix kms pageflip events by reordering irq handling order.
  drm/nouveau/disp/nv04-nv40: abort scanoutpos query on vga analog.
  drm/nv50-/kms: wait for enough ring space in crtc_prepare()
  drm/nouveau/disp/dp: support training pattern 3
  drm/nouveau/disp/dp: support aux read interval during link training
  drm/gk104/gpio: fix incorrect interrupt register usage
  drm/nouveau/core: punt all object state change messages to trace level
  drm/nouveau/clk: allow end-user reclocking for nv40, nvaa, and nve0 clock types
  drm/nouveau/fb: default NvMemExec to on, turning it off is used for debugging only
  drm/nouveau/bios: fix a potential NULL deref in the PROM shadowing function
  drm/nouveau/i2c: bump the i2c delay for the adt7473
  drm/nouveau/therm/fan/tach: default to 2 pulses per revolution
  drm/nvf0/device: enable video decoding engines on gk110/gk208
  drm/nvf1/device: add support for 0xf1 (gk110b)
  drm/nouveau/device: support for probing GK20A
  drm/nouveau/graph: add GK20A support
  drm/nouveau/graph: pad firmware code at load time
  drm/nouveau/graph: enable when using external fw
  ...
2014-06-10 16:39:21 +10:00