1
0
Fork 0
Commit Graph

118 Commits (8a227555a8e9826a518878a366c007931304a0a8)

Author SHA1 Message Date
Linus Torvalds 612a9aab56 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm merge (part 1) from Dave Airlie:
 "So first of all my tree and uapi stuff has a conflict mess, its my
  fault as the nouveau stuff didn't hit -next as were trying to rebase
  regressions out of it before we merged.

  Highlights:
   - SH mobile modesetting driver and associated helpers
   - some DRM core documentation
   - i915 modesetting rework, haswell hdmi, haswell and vlv fixes, write
     combined pte writing, ilk rc6 support,
   - nouveau: major driver rework into a hw core driver, makes features
     like SLI a lot saner to implement,
   - psb: add eDP/DP support for Cedarview
   - radeon: 2 layer page tables, async VM pte updates, better PLL
     selection for > 2 screens, better ACPI interactions

  The rest is general grab bag of fixes.

  So why part 1? well I have the exynos pull req which came in a bit
  late but was waiting for me to do something they shouldn't have and it
  looks fairly safe, and David Howells has some more header cleanups
  he'd like me to pull, that seem like a good idea, but I'd like to get
  this merge out of the way so -next dosen't get blocked."

Tons of conflicts mostly due to silly include line changes, but mostly
mindless.  A few other small semantic conflicts too, noted from Dave's
pre-merged branch.

* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (447 commits)
  drm/nv98/crypt: fix fuc build with latest envyas
  drm/nouveau/devinit: fixup various issues with subdev ctor/init ordering
  drm/nv41/vm: fix and enable use of "real" pciegart
  drm/nv44/vm: fix and enable use of "real" pciegart
  drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcie
  drm/nouveau: store supported dma mask in vmmgr
  drm/nvc0/ibus: initial implementation of subdev
  drm/nouveau/therm: add support for fan-control modes
  drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rules
  drm/nouveau/therm: calculate the pwm divisor on nv50+
  drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster
  drm/nouveau/therm: move thermal-related functions to the therm subdev
  drm/nouveau/bios: parse the pwm divisor from the perf table
  drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devices
  drm/nouveau/therm: rework thermal table parsing
  drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table
  drm/nouveau: fix pm initialization order
  drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it
  drm/nouveau: log channel debug/error messages from client object rather than drm client
  drm/nouveau: have drm debugging macros build on top of core macros
  ...
2012-10-03 23:29:23 -07:00
David Howells 760285e7e7 UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/
Convert #include "..." to #include <path/...> in drivers/gpu/.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
2012-10-02 18:01:07 +01:00
Alex Deucher bced76f271 drm/radeon: restore backlight level on resume
Restore the backlight level on resume.  Some systems
need to explicitly restore the backlight level on
resume.

Fixes panel resume on my Trinity laptop and may fix the
following bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=43829
https://bugzilla.kernel.org/show_bug.cgi?id=46241

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-27 10:22:42 -04:00
Alex Deucher f3728734ba drm/radeon: add backlight control for atom devices (v2)
On systems that use the build in GPU backlight controller,
we can use atom tables to change the brightness level.

v2: use firmware flags

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-09-20 13:10:35 -04:00
Alex Deucher 1b2681ba27 drm/radeon/kms: update duallink checks for DCE6
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-21 06:55:58 +00:00
Alex Deucher 38aa4a568b drm/radeon/kms: fix hdmi duallink checks
All pre-SI chips are limited to 165 Mhz for single link.
Code in question will be re-enabled when SI support is added.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=44755
https://bugzilla.kernel.org/show_bug.cgi?id=42887

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-08 09:39:54 +00:00
Alex Deucher 9aa59993e2 drm/radeon/kms: refine TMDS dual link checks
HDMI 1.3 defines single link clocks up to 340 Mhz.
Refine the current dual link checks to only enable
dual link for DVI > 165 Mhz or HDMI > 340 Mhz if the
hw supports HDMI 1.3 (DCE3+).

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=44755

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-24 17:35:52 +00:00
Alex Deucher dc87cd5c26 drm/radeon/kms: fix return type for radeon_encoder_get_dp_bridge_encoder_id
Seems like something got mis-merged here.

Noticed by kallisti5 on IRC.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-12-07 10:44:38 +00:00
Alex Deucher 3f03ced880 drm/radeon/kms: move atom encoder setup to a new file
Leave the common code in radeon_encoders.c and move the atom
specific code to atombios_encoders.c.  This matches legacy
encoder setup and crtc setup.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-01 16:05:07 +00:00
Alex Deucher 996d5c5900 drm/radeon/kms: check for DP MST mode in a few more places (v2)
DP MST is DP multi-stream support, part of DP 1.2.

v2: switch to a helper macro as suggested by Michel.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-01 16:04:57 +00:00
Alex Deucher c41384f827 drm/radeon/kms/atom: rework encoder dpms
The existing function was getting too big and complex.
Break it down into a more manageable set of functions.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-01 16:04:53 +00:00
Alex Deucher 1d33e1fc8d drm/radeon/kms: rework DP bridge checks
Return the encoder id rather than a boolean.  This is needed
for differentiate between multiple DP bridge chips.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-01 16:04:39 +00:00
Alex Deucher a4863ca93c drm/radeon/kms/DCE4.1: fix Select_CrtcSource EncodeMode setting for DP bridges (v2)
Settings in this table reflect the physical panel/connector rather
than the internal dig encoding.

v2: fix typo for DRM_MODE_CONNECTOR_VGA case.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-18 10:16:55 +01:00
Alex Deucher 3a6dea3145 drm/radeon/kms/DCE4.1: fix dig encoder to transmitter mapping
llano has fully routeable dig encoders similar to DCE3.2 while
ontario has a hardcoded mapping similar to DCE4.0.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-18 10:16:10 +01:00
Alex Deucher cb7cf41961 drm/radeon/kms: use hardcoded dig encoder to transmitter mapping for DCE4.1
The encoders are supposedly fully routeable, but changing the mapping
doesn't always seem to take.  Using a hardcoded mapping is much more
reliable.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=41366

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-06 11:45:30 +01:00
Alex Deucher fdfc61594e drm/radeon/kms: fix DDIA enable on some rs690 systems
DVOOutputControl checks the value of of bios scratch reg 3
on some tables and assumes the encoder is already enabled
if the DFP2_ACTIVE bit is set.  Clear that bit so the table
sets the DDIA enable bit properly.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-09-23 14:02:18 +01:00
Alex Deucher 33ae1827d6 drm/radeon/kms: fix regression is handling >2 heads on cedar/caicos
Need to add support for 4 crtcs when setting the possible crtcs
for the encoders.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-08-12 10:48:08 +01:00
Alex Deucher 74d074eecb drm/radeon/kms: add missing param for dce3.2 DP transmitter setup
This is used during phy init to set up the phy for DP.  This may
fix DP problems on DCE3.2 cards.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-20 09:53:02 +10:00
Alex Deucher 8323fa6ba3 drm/radeon/kms/atom: fix duallink on some early DCE3.2 cards
Certain revisions of the vbios on DCE3.2 cards have a bug
in the transmitter control table which prevents duallink from
being enabled properly on some cards.  The action switch statement
jumps to the wrong offset for the OUTPUT_ENABLE action.  The fix
is to use the ENABLE action rather than the OUTPUT_ENABLE action
on the affected cards.  In fixed version of the vbios, both
actions jump to the same offset, so the change should be safe.

Reported-and-tested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-20 09:52:24 +10:00
Alex Deucher 11b0a5b89a drm/radeon/kms: set DP link config properly for DP bridges
DP clock and lanes were not set properly for DP bridges.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-17 09:28:11 +10:00
Alex Deucher d6c669528a drm/radeon/kms: issue blank/unblank commands for ext encoders
Required for DPMS on some systems.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-17 09:28:05 +10:00
Alex Deucher 591a10e16c drm/radeon/kms: fix support for DDC on dp bridges
Need to set up the bridge for DDC prior to the
i2c over aux transaction.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-17 09:28:03 +10:00
Alex Deucher d629a3ceb4 drm/radeon/kms: add support for load detection on dp bridges
dp to vga bridges for example.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-17 09:28:02 +10:00
Alex Deucher fbb8777365 drm/radeon/kms: rework atombios_get_encoder_mode()
This should give us more reliable results if the table
is called before an active device is set.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-17 09:27:59 +10:00
Alex Deucher f3aeceac61 drm/radeon/kms/atom: fix PHY init
The PHY was not initialized correctly after
ac89af1e10 since
the function bailed early as an encoder was not
assigned.  The encoder isn't necessary for PHY init
so just assign to 0 for init so that the table
is executed.

Reported-by: Ari Savolainen <ari.m.savolainen@gmail.com>
Tested-by: Ari Savolainen <ari.m.savolainen@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-05 16:34:13 +10:00
Alex Deucher ac89af1e10 drm/radeon/kms/atom: move dig phy init out of modesetting
It only needs to be called once at startup, not for every
modeset.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-24 08:59:30 +10:00
Alex Deucher 224d94b144 drm/radeon/kms: rewrite DP handling
- reorganize the functions based on use
- clean up function naming
- rework link training to better match what we use internally
- add initial support for DP 1.2 (no MST yet)

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-20 20:02:32 +10:00
Alex Deucher 558e27db8f drm/radeon/kms/atom: add support for setting DP panel mode
Required for proper operation with DP bridges.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-20 20:02:31 +10:00
Alex Deucher eac4dff6d3 drm/radeon/kms: handle DP bridges
Fusion hardware often has DP to VGA/LVDS/TMDS bridges to
handle non-DP encoders.  Internally we treat them mostly
like DP.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-20 20:02:29 +10:00
Alex Deucher d7fa8bb385 drm/radeon/kms: add some dp encoder/connector helper funcs
Used for dp1.2 support and for dp bridges.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-20 20:02:26 +10:00
Alex Deucher 4e633939fe drm/radeon/kms: make sure eDP panel is on for modesetting
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-20 20:02:25 +10:00
Alex Deucher 2dafb74d63 drm/radeon/kms: fix eDP panel power function
need to wait for the panel to power up.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-20 20:02:24 +10:00
Alex Deucher 3a5f4a21c5 drm/radeon/kms: adjust eDP handling (v2)
eDP is usually used as an LVDS replacement, so treat
it more like LVDS from the user perspective.

v2: encoder mode is always DP for eDP.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-20 20:02:23 +10:00
Alex Deucher 86a94defe2 drm/radeon/kms: fix up DP clock programming on DCE4/5
In DP mode, the DP ref clock can come from PPLL, DCPLL, or ext clock,
depending on the asic.  The crtc virtual pixel clock is derived from
the DP ref clock.

- DCE4: PPLL or ext clock
- DCE5: DCPLL or ext clock

Setting ATOM_PPLL_INVALID will cause SetPixelClock to skip
PPLL/DCPLL programming and only program the DP DTO for the
crtc virtual pixel clock.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-20 20:02:22 +10:00
Alex Deucher df271bec80 drm/radeon/kms: properly handle bpc >8 in atom command tables
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-20 20:02:20 +10:00
Alex Deucher 96b3bef8c1 drm/radeon/kms: DCE4.1 DIG encoders are fully routeable just like DCE3.2
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-05-20 20:02:19 +10:00
Alex Deucher cb49ba0bb1 drm/radeon/kms: remove some underscan leftovers
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-04-28 14:51:09 +10:00
Cédric Cano 4589433c57 drm/radeon/kms: atombios big endian fixes
agd5f: additional cleanups/fixes

Signed-off-by: Cédric Cano <ccano@interfaceconcept.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-14 09:23:36 +10:00
Alex Deucher c9417bdd4c drm/radeon/kms: fix interlaced modes on dce4+
- set scaler table clears the interleave bit, need to
reset it in encoder quirks, this was already done for
pre-dce4.
- remove the interleave settings from set_base() functions
this is now handled in the encoder quirks functions, and
isn't technically part of the display base setup.
- rename evergreen_do_set_base() to dce4_do_set_base() since
it's used on both evergreen and NI asics.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=28182

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-14 09:22:53 +10:00
Stefan Weil e468e0017b drm/radeon: Fix wrong boolean operator
This error is reported by cppcheck:
drivers/gpu/drm/radeon/radeon_encoders.c:1066: warning: Mutual exclusion over || always evaluates to true. Did you intend to use && instead?

It looks like cppcheck is correct, so fix this. No test was run.

Cc: David Airlie <airlied@linux.ie>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-31 09:58:35 +10:00
Alex Deucher 9453d62118 drm/radeon/kms: only enable HDMI mode if radeon audio is enabled
Force DVI mode if the user specifies radeon.audio=0.  The driver
doesn't handle HDMI mode properly in some cases.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=27731

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
2011-01-27 13:52:49 +10:00
Alex Deucher c268cd36cc drm/radeon/kms: only enable hdmi features if the monitor supports audio
This avoids some issues in the current hdmi audio code for monitors
without audio.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-10 12:38:40 +10:00
Alex Deucher 36868bda88 drm/radeon/kms: parse DCE5 encoder caps when setting up encoders
Needed to tell which DIG encoders are HBR2 capable for DP 1.2.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-07 14:11:28 +10:00
Alex Deucher d07f4e8350 drm/radeon/kms: dvo dpms updates for DCE5
The DVOOutputControl table was removed for DCE5.
DVOEncoderControl now handles everything.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-07 14:11:27 +10:00
Alex Deucher 69c74525c2 drm/radeon/kms: dac dpms updates for DCE5
The DAC1OutputControl table was removed for DCE5.
DAC1EncoderControl now handles everything.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-07 14:11:26 +10:00
Alex Deucher badbb57b93 drm/radeon/kms: DCE5 atom dig encoder updates
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-07 14:11:25 +10:00
Alex Deucher a001182af8 drm/radeon/kms: DCE5 atom transmitter control updates
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-07 14:11:24 +10:00
Alex Deucher 633b91643f drm/radeon/kms: clean up ASIC_IS_DCE41() macro
only fusion asics are dce4.1

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-07 14:11:17 +10:00
Alex Deucher b61c99de8e drm/radeon/kms: fix DCE4.1 dig routing (v2)
Works more like DCE4.0 despite what the docs say.
This fixes blank screen issues when changing crtc
routing due to incorrect crtc to dig mapping.

v2: only two DIGx blocks, routing is hardcoded
based on link.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-12-21 12:58:18 +10:00
Alex Deucher bf982ebf22 drm/radeon/kms: Add support for external encoders on fusion APUs
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-23 09:23:21 +10:00