Commit graph

15619 commits

Author SHA1 Message Date
Mario Kleiner 5c868229da drm/radeon: Use dce5/6 hdmi deep color clock setup also on dce8+
Need to use the adjusted clock on dce8 as well.

bug:
https://bugs.freedesktop.org/show_bug.cgi?id=80029

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-18 16:30:46 -04:00
Dave Airlie 571366284b Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
couple more DP regression fixes.
* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau/disp: fix oops in destructor with headless cards
  drm/gf117/i2c: no aux channels on this chipset
2014-06-18 15:50:58 +10:00
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
Dave Airlie 844f22823e Merge branch 'drm-next-3.16' of git://people.freedesktop.org/~agd5f/linux into drm-next
two fixes for the deep color support in radeon.

* 'drm-next-3.16' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: Bypass hw lut's for > 8 bpc framebuffer scanout.
  drm/radeon: use pixel formats instead of depth/bpp
2014-06-17 14:59:43 +10:00
Dave Airlie 4139829c22 Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
This is bigger because it regenerates the internal firmwares after a fix.

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau/doc: update the thermal documentation
  drm/nouveau/pwr: fix typo in fifo wrap handling
  drm/nv50/disp: fix a potential oops in supervisor handling
  drm/nouveau/disp/dp: don't touch link config after success
  drm/nouveau/kms: reference vblank for crtc during pageflip.
  drm/gk104/fb/ram: fixups from an earlier search+replace
  drm/nv50/gr: remove an unneeded write while initialising PGRAPH
  drm/nv50/gr: fix overlap while zeroing zcull regions
  drm/gf100-/gr: report class data to host on fwmthd failure
  drm/gk104/ibus: increase various random timeouts
  drm/gk104/clk: only touch divider for mode we'll be using
2014-06-17 14:57:08 +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
Mario Kleiner ba124a4105 drm/nouveau/kms: reference vblank for crtc during pageflip.
Need to drm_vblank_get/put() the crtc involved in a
pending pageflip, or we might not get vblank irqs and
updates of vblank counts and timestamps for pageflip
events and flip completion.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
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
Mario Kleiner 4366f3b5f5 drm/radeon: Bypass hw lut's for > 8 bpc framebuffer scanout.
The hardware lut's only have 256 slots for indexing by a
8 bpc framebuffer. In 10 bpc scanout modes, framebuffer
color values would get truncated to their 8 msb's,
thereby losing the extra precision afforded by a 10 bpc
framebuffer.

To retain full precision, bypass the hw lut in 10 bpc
scanout mode.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-13 12:22:30 -04:00
Fredrik Höglund 8bae42769d drm/radeon: use pixel formats instead of depth/bpp
This disambiguates depth 16 formats, such as ARGB1555 and ARGB4444,
and depth 32 formats such as ARGB2101010 and ARGB8888.

This patch also adds support for depth 30 (XRGB2101010) framebuffers.

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-06-13 12:22:16 -04:00
Linus Torvalds 682b7c1c8e Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie:
 "This is the main drm merge window pull request, changes all over the
  place, mostly normal levels of churn.

  Highlights:

  Core drm:
     More cleanups, fix race on connector/encoder naming, docs updates,
     object locking rework in prep for atomic modeset

  i915:
     mipi DSI support, valleyview power fixes, cursor size fixes,
     execlist refactoring, vblank improvements, userptr support, OOM
     handling improvements

  radeon:
     GPUVM tuning and large page size support, gart fixes, deep color
     HDMI support, HDMI audio cleanups

  nouveau:
     - displayport rework should fix lots of issues
     - initial gk20a support
     - gk110b support
     - gk208 fixes

  exynos:
     probe order fixes, HDMI changes, IPP consolidation

  msm:
     debugfs updates, misc fixes

  ast:
     ast2400 support, sync with UMS driver

  tegra:
     cleanups, hdmi + hw cursor for Tegra 124.

  panel:
     fixes existing panels add some new ones.

  ipuv3:
     moved from staging to drivers/gpu"

* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (761 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-12 11:32:30 -07: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 8777c5c117 drm/nouveau/dp: probe dpcd to determine connectedness
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:11:42 +10:00
Ben Skeggs efa366fdf5 drm/nv50-: trigger update after all connectors disabled
We were sending the necessary state changes to unset the mode, but
never actually hit the big GO button unless another modeset happens
afterwards.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:11:35 +10:00
Ben Skeggs e84a35a805 drm/nv50-: prepare for attaching a SOR to multiple heads
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:11:29 +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 4874322e78 drm/nouveau/dp: fix support for dpms
SOR_PWR has no effect to power-off DP links, unlike other SOR protocols.

Instead, on the source side, we cut power to the lanes after having put
the sink into D3.  Link training takes care of everything required to
bring it back again.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:11:10 +10:00
Ben Skeggs 8894f4919b drm/nouveau: register a drm_dp_aux channel for each dp connector
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:11:04 +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 456b0579fb drm/nouveau: use connector events for HPD instead of GPIO watching
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-06-11 16:10:37 +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