OSDN Git Service

drm/i915/tc: Fix TypeC port init/resume time sanitization
authorImre Deak <imre.deak@intel.com>
Wed, 29 Sep 2021 13:28:27 +0000 (16:28 +0300)
committerJani Nikula <jani.nikula@intel.com>
Tue, 5 Oct 2021 08:52:48 +0000 (11:52 +0300)
commita532cde31de3cae6ed60e60d6f9379771f652809
tree79f34b6c16db2b9b0e46cdd7dc6dcd6174445520
parent0c94777386495d6e0a9735d48ffd2abb8d680d7f
drm/i915/tc: Fix TypeC port init/resume time sanitization

Atm during driver loading and system resume TypeC ports are accessed
before their HW/SW state is synced. Move the TypeC port sanitization to
the encoder's sync_state hook to fix this.

v2: Handle the encoder disabled case in gen11_dsi_sync_state() as well
    (Jose, Jani)

Fixes: f9e76a6e68d3 ("drm/i915: Add an encoder hook to sanitize its state during init/resume")
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210929132833.2253961-1-imre.deak@intel.com
(cherry picked from commit 7194dc998dfffca096c30b3cd39625158608992d)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_display.c