OSDN Git Service

drm/i915: Fix TypeC mode initialization during system resume
authorImre Deak <imre.deak@intel.com>
Thu, 22 Sep 2022 17:21:48 +0000 (20:21 +0300)
committerImre Deak <imre.deak@intel.com>
Tue, 27 Sep 2022 13:04:06 +0000 (16:04 +0300)
commita82796a2e332d108b2d3aff38509caad370f69b5
tree9cd2c171a9531241a6e6554da217355a3f33a79b
parente731a2d2fa13eaa584f4730d619e8e89061e4f6e
drm/i915: Fix TypeC mode initialization during system resume

During system resume DP MST requires AUX to be working already before
the HW state readout of the given encoder. Since AUX requires the
encoder/PHY TypeC mode to be initialized, which atm only happens during
HW state readout, these AUX transfers can change the TypeC mode
incorrectly (disconnecting the PHY for an enabled encoder) and trigger
the state check WARNs in intel_tc_port_sanitize().

Fix this by initializing the TypeC mode earlier both during driver
loading and system resume and making sure that the mode can't change
until the encoder's state is read out. While at it add the missing
DocBook comments and rename
intel_tc_port_sanitize()->intel_tc_port_sanitize_mode() for consistency.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220922172148.2913088-1-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_tc.c
drivers/gpu/drm/i915/display/intel_tc.h