drm/i915: Apply Wa Display #1183 on skl, kbl, and cfl
Subsystems (2)
PATCH v4 1/1 drm/i915: Apply Wa Display #1183 on skl, kbl, and cfl
Wa Display #1183 was recently added to workaround "Failures when enabling DPLL0 with eDP link rate 2.16 or 4.32 GHz and CD clock frequency 308.57 or 617.14 MHz (CDCLK_CTL CD Frequency Select 10b or 11b) used in this
enabling or in previous enabling."
This Workaround was designed to minimize the impact only to save the bad case with that link rates. But HW engineers indicated that it should be safe to apply broadly, although they were expecting the DPLL0 link rate to be unchanged on runtime.
We need to cover 2 cases: when we are in fact enabling DPLL0 and when we are just changing the frequency with small differences.
This is based on previous patch by Rodrigo Vivi with suggestions from Ville Syrjälä.
--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_cdclk.c | 44 +++++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_runtime_pm.c | 10 ++++++++ 3 files changed, 43 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -7019,6 +7019,7 @@ enum {#define RESET_PCH_HANDSHAKE_ENABLE (1<<4)#define GEN8_CHICKEN_DCPR_1 _MMIO(0x46430) +#define SKL_SELECT_ALTERNATE_DC_EXIT (1<<30)#define MASK_WAKEMEM (1<<13)#define SKL_DFSM _MMIO(0x51000)
@@ -8573,6 +8574,7 @@ enum skl_power_gate {#define BXT_CDCLK_CD2X_DIV_SEL_2 (2<<22)#define BXT_CDCLK_CD2X_DIV_SEL_4 (3<<22)#define BXT_CDCLK_CD2X_PIPE (pipe) ((pipe)<<20) +#define CDCLK_DIVMUX_CD_OVERRIDE (1<<19)#define BXT_CDCLK_CD2X_PIPE_NONE BXT_CDCLK_CD2X_PIPE(3)#define BXT_CDCLK_SSA_PRECHARGE_ENABLE (1<<16)#define CDCLK_FREQ_DECIMAL_MASK (0x7ff)
drivers/gpu/drm/i915/intel_cdclk.c +31 -13
77 lines not on this page · raw message
drivers/gpu/drm/i915/intel_runtime_pm.c +10 -0
@@ -598,6 +598,11 @@ void gen9_enable_dc5(struct drm_i915_private *dev_priv)DRM_DEBUG_KMS ("Enabling DC5\n" ); +/* Wa Display #1183: skl,kbl,cfl */ +if (IS_GEN9_BC (dev_priv)) +I915_WRITE (GEN8_CHICKEN_DCPR_1 ,I915_READ (GEN8_CHICKEN_DCPR_1 ) | +SKL_SELECT_ALTERNATE_DC_EXIT ); +gen9_set_dc_state (dev_priv,DC_STATE_EN_UPTO_DC5 ); }
@@ -625,6 +630,11 @@ void skl_disable_dc6(struct drm_i915_private *dev_priv) {DRM_DEBUG_KMS ("Disabling DC6\n" ); +/* Wa Display #1183: skl,kbl,cfl */ +if (IS_GEN9_BC (dev_priv)) +I915_WRITE (GEN8_CHICKEN_DCPR_1 ,I915_READ (GEN8_CHICKEN_DCPR_1 ) | +SKL_SELECT_ALTERNATE_DC_EXIT ); +gen9_set_dc_state (dev_priv,DC_STATE_DISABLE ); }
Signature · 6 lines
2.14.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 94 lines · Lucas De Marchi
Wa Display #1183 was recently added to workaround "Failures when enabling DPLL0 with eDP link rate 2.16 or 4.32 GHz and CD clock frequency 308.57 or 617.14 MHz (
CDCLK_CTLCD Frequency Select 10b or 11b) used in this
enabling or in previous enabling."This Workaround was designed to minimize the impact only to save the bad case with that link rates. But HW engineers indicated that it should be safe to apply broadly, although they were expecting the DPLL0 link rate to be unchanged on runtime.
We need to cover 2 cases: when we are in fact enabling DPLL0 and when we are just changing the frequency with small differences.
This is based on previous patch by Rodrigo Vivi with suggestions from Ville Syrjälä.
Cc Arthur J Runyan <[email protected]>Cc Ville Syrjälä <[email protected]>Cc Rodrigo Vivi <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/intel_cdclk.c | 44 +++++++++++++++++++++++---------- drivers/gpu/drm/i915/intel_runtime_pm.c | 10 ++++++++ 3 files changed, 43 insertions(+), 13 deletions(-)drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -7019,6 +7019,7 @@ enum {#define RESET_PCH_HANDSHAKE_ENABLE (1<<4)#define GEN8_CHICKEN_DCPR_1 _MMIO(0x46430) +#define SKL_SELECT_ALTERNATE_DC_EXIT (1<<30)#define MASK_WAKEMEM (1<<13)#define SKL_DFSM _MMIO(0x51000)@@ -8573,6 +8574,7 @@ enum skl_power_gate {#define BXT_CDCLK_CD2X_DIV_SEL_2 (2<<22)#define BXT_CDCLK_CD2X_DIV_SEL_4 (3<<22)#define BXT_CDCLK_CD2X_PIPE (pipe) ((pipe)<<20) +#define CDCLK_DIVMUX_CD_OVERRIDE (1<<19)#define BXT_CDCLK_CD2X_PIPE_NONE BXT_CDCLK_CD2X_PIPE(3)#define BXT_CDCLK_SSA_PRECHARGE_ENABLE (1<<16)#define CDCLK_FREQ_DECIMAL_MASK (0x7ff)drivers/gpu/drm/i915/intel_cdclk.c +3
-9@@ -931,16 +931,10 @@ static void skl_set_preferred_cdclk_vco(struct drm_i915_private *dev_priv,static void skl_dpll0_enable (struct drm_i915_private *dev_priv,int vco) { -int min_cdclk =skl_calc_cdclk (0 , vco);u32 val;WARN_ON (vco !=8100000 && vco !=8640000 ); -/* select the minimum CDCLK before enabling DPLL 0 */ - val =CDCLK_FREQ_337_308 |skl_cdclk_decimal (min_cdclk); -I915_WRITE (CDCLK_CTL , val); -POSTING_READ (CDCLK_CTL ); -/* * We always enable DPLL0 with the lowest link rate possible, but still * taking into account the VCO required to operate the eDP panel at the @@ -994,7 +988,8 @@ static void skl_set_cdclk(struct drm_i915_private *dev_priv, {int cdclk = cdclk_state->cdclk;int vco = cdclk_state->vco; -u32 freq_select; +u32 freq_select, cdclk_ctl; +bool need_dpll0_enable;int ret;mutex_lock (&dev_priv->pcu_lock);@@ -1009,7 +1004,7 @@ static void skl_set_cdclk(struct drm_i915_private *dev_priv,return ; } -/* set CDCLK_CTL */ +/* Choose frequency for this cdclk */ switch (cdclk) {default :WARN_ON (cdclk != dev_priv->cdclk.hw.ref);@@ -1032,16 +1027,39 @@ static void skl_set_cdclk(struct drm_i915_private *dev_priv,break ; } - if (dev_priv->cdclk.hw.vco != 0 &&
drivers/gpu/drm/i915/intel_cdclk.c static void skl_set_cdclk(struct drm_i915_private *dev_priv, · line 1036
Quoted 10 lines
drivers/gpu/drm/i915/intel_cdclk.c +5
-3- dev_priv->cdclk.hw.vco != vco) + need_dpll0_enable = dev_priv->cdclk.hw.vco != vco; + +if (dev_priv->cdclk.hw.vco !=0 && need_dpll0_enable)skl_dpll0_disable (dev_priv); -if (dev_priv->cdclk.hw.vco != vco) -skl_dpll0_enable (dev_priv, vco); + cdclk_ctl =I915_READ (CDCLK_CTL ); + cdclk_ctl &= ~(CDCLK_FREQ_SEL_MASK |CDCLK_FREQ_DECIMAL_MASK );
Ooops, this line should be inside the if () below... I fixed it up and forgot it stashed. I'll wait for a review before resending.
Lucas De Marchi
Quoted 65 lines
drivers/gpu/drm/i915/intel_cdclk.c +23
-1-I915_WRITE (CDCLK_CTL , freq_select |skl_cdclk_decimal (cdclk)); +if (need_dpll0_enable) { +/* Wa Display #1183: skl,kbl,cfl */ + cdclk_ctl |= freq_select |skl_cdclk_decimal (cdclk); +I915_WRITE (CDCLK_CTL , cdclk_ctl); + } + +/* Wa Display #1183: skl,kbl,cfl */ + cdclk_ctl |=CDCLK_DIVMUX_CD_OVERRIDE ; +I915_WRITE (CDCLK_CTL , cdclk_ctl);POSTING_READ (CDCLK_CTL ); +if (need_dpll0_enable) +skl_dpll0_enable (dev_priv, vco); + +/* Wa Display #1183: skl,kbl,cfl */ + cdclk_ctl &= ~(CDCLK_FREQ_SEL_MASK |CDCLK_FREQ_DECIMAL_MASK ); +I915_WRITE (CDCLK_CTL , cdclk_ctl); + + cdclk_ctl |= freq_select |skl_cdclk_decimal (cdclk); +I915_WRITE (CDCLK_CTL , cdclk_ctl); + +/* Wa Display #1183: skl,kbl,cfl */ + cdclk_ctl &= ~CDCLK_DIVMUX_CD_OVERRIDE ; +I915_WRITE (CDCLK_CTL , cdclk_ctl); +/* inform PCU of the change */ mutex_lock (&dev_priv->pcu_lock); sandybridge_pcode_write(dev_priv, SKL_PCODE_CDCLK_CONTROL,drivers/gpu/drm/i915/intel_runtime_pm.c +10
-1@@ -598,6 +598,11 @@ void gen9_enable_dc5(struct drm_i915_private *dev_priv)DRM_DEBUG_KMS ("Enabling DC5\n" ); +/* Wa Display #1183: skl,kbl,cfl */ +if (IS_GEN9_BC (dev_priv)) +I915_WRITE (GEN8_CHICKEN_DCPR_1 ,I915_READ (GEN8_CHICKEN_DCPR_1 ) | +SKL_SELECT_ALTERNATE_DC_EXIT ); +gen9_set_dc_state (dev_priv,DC_STATE_EN_UPTO_DC5 ); }@@ -625,6 +630,11 @@ void skl_disable_dc6(struct drm_i915_private *dev_priv) {DRM_DEBUG_KMS ("Disabling DC6\n" ); +/* Wa Display #1183: skl,kbl,cfl */ +if (IS_GEN9_BC (dev_priv)) +I915_WRITE (GEN8_CHICKEN_DCPR_1 ,I915_READ (GEN8_CHICKEN_DCPR_1 ) | +SKL_SELECT_ALTERNATE_DC_EXIT ); +gen9_set_dc_state (dev_priv,DC_STATE_DISABLE ); } --2.14.3
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Lucas De Marchi _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: warning for drm/i915: Apply Wa Display #1183 on skl, kbl, and cfl (rev2)
In reply to Lucas De Marchi== Series Details ==
== Series Details ==
Series: drm/i915: Apply Wa Display #1183 on skl, kbl, and cfl (rev2)
URL : https://patchwork.freedesktop.org/series/33508/
State : warning
== Summary ==
Series 33508v2 drm/i915: Apply Wa Display #1183 on skl, kbl, and cfl
https://patchwork.freedesktop.org/api/1.0/series/33508/revisions/2/mbox/
Test chamelium:
Subgroup dp-crc-fast:
pass -> FAIL (fi-kbl-7500u) fdo#102514
Subgroup common-hpd-after-suspend:
pass -> DMESG-WARN (fi-skl-6700k)
Test gem_exec_suspend:
Subgroup basic-s3:
pass -> DMESG-WARN (fi-skl-6260u)
pass -> DMESG-WARN (fi-skl-6600u)
pass -> DMESG-WARN (fi-skl-6700hq)
pass -> DMESG-WARN (fi-skl-6700k)
pass -> DMESG-WARN (fi-skl-6770hq)
pass -> DMESG-WARN (fi-skl-gvtdvm)
pass -> DMESG-WARN (fi-kbl-7500u)
pass -> DMESG-WARN (fi-kbl-7560u) fdo#103039
pass -> DMESG-WARN (fi-kbl-7567u) fdo#102846 +5
Subgroup basic-s4-devices:
pass -> DMESG-WARN (fi-skl-6700k)
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-legacy:
pass -> FAIL (fi-gdg-551) fdo#102618
Test kms_pipe_crc_basic:
Subgroup suspend-read-crc-pipe-a:
pass -> DMESG-WARN (fi-skl-6260u) fdo#100461 +2
pass -> DMESG-WARN (fi-skl-6600u)
pass -> DMESG-WARN (fi-skl-6700hq)
pass -> DMESG-WARN (fi-skl-6700k)
pass -> DMESG-WARN (fi-skl-6770hq)
pass -> DMESG-WARN (fi-skl-gvtdvm)
pass -> DMESG-WARN (fi-kbl-7500u)
Subgroup suspend-read-crc-pipe-b:
incomplete -> PASS (fi-snb-2520m) fdo#103713
pass -> DMESG-WARN (fi-skl-6600u)
pass -> DMESG-WARN (fi-skl-6700hq)
pass -> DMESG-WARN (fi-skl-6700k) fdo#103191 +1
pass -> DMESG-WARN (fi-skl-6770hq)
pass -> DMESG-WARN (fi-skl-gvtdvm)
pass -> DMESG-WARN (fi-kbl-7500u)
pass -> DMESG-WARN (fi-kbl-7560u) fdo#103706
Subgroup suspend-read-crc-pipe-c:
pass -> DMESG-WARN (fi-skl-6600u)
pass -> DMESG-WARN (fi-skl-6700hq)
pass -> DMESG-WARN (fi-skl-6770hq)
pass -> DMESG-WARN (fi-skl-gvtdvm)
pass -> DMESG-WARN (fi-kbl-7500u)
Test drv_module_reload:
Subgroup basic-reload:
pass -> DMESG-WARN (fi-skl-6700k)fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fdo#103039 https://bugs.freedesktop.org/show_bug.cgi?id=103039
fdo#102846 https://bugs.freedesktop.org/show_bug.cgi?id=102846
fdo#102618 https://bugs.freedesktop.org/show_bug.cgi?id=102618
fdo#100461 https://bugs.freedesktop.org/show_bug.cgi?id=100461
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103706 https://bugs.freedesktop.org/show_bug.cgi?id=103706
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:451s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:458s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:385s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:550s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:279s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:511s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:504s fi-byt-j1900 total:289 pass:254 dwarn:0 dfail:0 fail:0 skip:35 time:503s fi-byt-n2820 total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:494s fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:430s fi-gdg-551 total:289 pass:177 dwarn:1 dfail:0 fail:2 skip:109 time:275s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:543s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:433s fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:439s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:436s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:488s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:470s fi-kbl-7500u total:289 pass:259 dwarn:5 dfail:0 fail:1 skip:24 time:482s fi-kbl-7560u total:289 pass:266 dwarn:4 dfail:0 fail:0 skip:19 time:543s fi-kbl-7567u total:289 pass:265 dwarn:4 dfail:0 fail:0 skip:20 time:475s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:536s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:585s fi-skl-6260u total:289 pass:265 dwarn:4 dfail:0 fail:0 skip:20 time:464s fi-skl-6600u total:289 pass:258 dwarn:4 dfail:0 fail:0 skip:27 time:545s fi-skl-6700hq total:289 pass:259 dwarn:4 dfail:0 fail:0 skip:26 time:569s fi-skl-6700k total:289 pass:258 dwarn:7 dfail:0 fail:0 skip:24 time:521s fi-skl-6770hq total:289 pass:265 dwarn:4 dfail:0 fail:0 skip:20 time:496s fi-skl-gvtdvm total:289 pass:262 dwarn:4 dfail:0 fail:0 skip:23 time:461s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:557s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:424s
Blacklisted hosts:
fi-cfl-s total:289 pass:251 dwarn:6 dfail:0 fail:0 skip:32 time:532s
7916df8b49cb8bb9783a8425e7345cc47159f3f0 drm-tip: 2017y-11m-15d-20h-05m-48s UTC integration manifest 6672211149cf drm/i915: Apply Wa Display #1183 on skl, kbl, and cfl
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7152/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx