Skip to content

Commit ddd39e4

Browse files
lucasdemarchirodrigovivi
authored andcommitted
drm/i915/cnl: apply Display WA raspberrypi#1178 to fix type C dongles
Display WA raspberrypi#1178 is meant to fix Aux channel voltage swing too low with some type C dongles. Although it is for type C, HW engineers reported that it can be applied to all external ports even if they are not going to type C. For CNL we apply the workaround every time Aux B, C and D are powering up since they will lose the configuration when powered down. v2: Use common tag for WA Cc: Rodrigo Vivi <[email protected]> Cc: Arthur J Runyan <[email protected]> Cc: Ville Syrjälä <[email protected]> Signed-off-by: Lucas De Marchi <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 1edf695 commit ddd39e4

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8350,6 +8350,17 @@ enum skl_power_gate {
83508350
#define SKL_PW_TO_PG(pw) ((pw) - SKL_DISP_PW_1 + SKL_PG1)
83518351
#define SKL_FUSE_PG_DIST_STATUS(pg) (1 << (27 - (pg)))
83528352

8353+
#define _CNL_AUX_REG_IDX(pw) ((pw - 1) >> 4)
8354+
#define _CNL_AUX_ANAOVRD1_B 0x162250
8355+
#define _CNL_AUX_ANAOVRD1_C 0x162210
8356+
#define _CNL_AUX_ANAOVRD1_D 0x1622D0
8357+
#define CNL_AUX_ANAOVRD1(pw) _MMIO(_PICK(_CNL_AUX_REG_IDX(pw), \
8358+
_CNL_AUX_ANAOVRD1_B, \
8359+
_CNL_AUX_ANAOVRD1_C, \
8360+
_CNL_AUX_ANAOVRD1_D))
8361+
#define CNL_AUX_ANAOVRD1_ENABLE (1<<16)
8362+
#define CNL_AUX_ANAOVRD1_LDO_BYPASS (1<<23)
8363+
83538364
/* Per-pipe DDI Function Control */
83548365
#define _TRANS_DDI_FUNC_CTL_A 0x60400
83558366
#define _TRANS_DDI_FUNC_CTL_B 0x61400

drivers/gpu/drm/i915/intel_runtime_pm.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,15 @@ static void hsw_power_well_enable(struct drm_i915_private *dev_priv,
390390
I915_WRITE(HSW_PWR_WELL_CTL_DRIVER(id), val | HSW_PWR_WELL_CTL_REQ(id));
391391
hsw_wait_for_power_well_enable(dev_priv, power_well);
392392

393+
/* Display WA #1178: cnl */
394+
if (IS_CANNONLAKE(dev_priv) &&
395+
(id == CNL_DISP_PW_AUX_B || id == CNL_DISP_PW_AUX_C ||
396+
id == CNL_DISP_PW_AUX_D)) {
397+
val = I915_READ(CNL_AUX_ANAOVRD1(id));
398+
val |= CNL_AUX_ANAOVRD1_ENABLE | CNL_AUX_ANAOVRD1_LDO_BYPASS;
399+
I915_WRITE(CNL_AUX_ANAOVRD1(id), val);
400+
}
401+
393402
if (wait_fuses)
394403
gen9_wait_for_power_well_fuses(dev_priv, pg);
395404

0 commit comments

Comments
 (0)