OSDN Git Service

drm/i915: Sanitize PCH port transcoder select on IBX
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 8 Nov 2018 14:36:35 +0000 (16:36 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 9 Nov 2018 15:44:34 +0000 (17:44 +0200)
commit3aefb67f84960f7b387c7cc39f095a01cf8f6234
tree5e4d3e0990de37329a4a9d0b90867d41e00671ad
parent5a3aeca97af1b6b3498d59a7fd4e8bb95814c108
drm/i915: Sanitize PCH port transcoder select on IBX

IBX has a documented workaround which states that when we disable the
port we must change its transcoder select to A, otherwise it will
prevent the other port (DP vs. HDMI/SDVO) from using transcoder A.
We implement the workaround during encoder disable, but looks like
some BIOSen leave transcoder B selected even when the port wasn't
actually enabled by the BIOS. That will trip up our asserts
that attempt to make sure we never forget this w/a.

Sanitize the transcoder select to A for all disabled PCH
DP/HDMI/SDVO ports. We assume that the port was never enabled
by the BIOS on transcoder B, because if it had we'd actually have
to toggle the port on and back off to properly switch it back to
transcoder A. That would cause some display flicker if transcoder A
is already enabled on some other port, so it's better not to do it
unless absolutely necessary. Since we have no indication that the
transcoder select is misbehaving on the affected machines we can
assume the port was never actually enabled by the BIOS.

This cures warning like this during driver load:
IBX PCH DP C still using transcoder B
WARNING: CPU: 2 PID: 172 at drivers/gpu/drm/i915/intel_display.c:1279 assert_pch_dp_disabled+0x9e/0xb0 [i915]

v2: Add comments to remind the reader that SDVOB==HDMIB (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181108143635.9556-1-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_display.c