]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/adlp: Fix register corruption after DDI clock enabling
authorImre Deak <imre.deak@intel.com>
Wed, 23 Mar 2022 20:17:49 +0000 (22:17 +0200)
committerImre Deak <imre.deak@intel.com>
Wed, 6 Apr 2022 16:23:38 +0000 (19:23 +0300)
commit47b11b8ef07e4f6f7cae5b5669dfed3a4ba584fd
treea63ab069789e34b678ef0102280c3043a8f0aa4c
parente79d15d48554f4a34946ac33de8a0c979b9ef46d
drm/i915/adlp: Fix register corruption after DDI clock enabling

Accessing the DDI_BUF_CTL register without the port's DDI clock being
enabled (to set/clear the TypeC PHY ownership for the port) can lead to
a corrupted value read during any i915 register access right after the
DDI clock is enabled.

The root cause is the way clock synchronization works for this register,
controlled by the CHICKEN_DCPR_1 DDI_CLOCK_REG_ACCESS flag. Correctly
this flag should be cleared on ADLP (see the Bspec link below), however
after bootup the flag is set.

One easily reproducible issue is an unclaimed register access of the
PWR_WELL_CTL_DDI2 register, programmed right after DDI clock enabling to
enable the port's DDI_IO power well (see the HSDES, VLK links below).
With the correct setting above this problem can't be reproduced.

Bspec: 49189
HSDES: 18019028154
VLK: 28328, 28655

Cc: Jouni Högander <jouni.hogander@intel.com>
Cc: Arthur J Runyan <arthur.j.runyan@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Arthur J Runyan <arthur.j.runyan@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220323201749.288566-1-imre.deak@intel.com
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_pm.c