drm/i915: Implement workaround for CDCLK PLL disable/enable
Subsystems (3)
PATCH 1/1 drm/i915: Implement workaround for CDCLK PLL disable/enable
It was reported that we might get a hung and loss of register access in some cases when CDCLK PLL is disabled and then enabled, while squashing is enabled.
As a workaround it was proposed by HW team that SW should disable squashing when CDCLK PLL is being reenabled.
--- drivers/gpu/drm/i915/display/intel_cdclk.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/display/intel_cdclk.c +12 -2
@@ -1801,6 +1801,13 @@ static bool cdclk_compute_crawl_and_squash_midpoint(struct drm_i915_private *i91return true; } +static bool pll_enable_wa_needed (struct drm_i915_private *dev_priv) +{ +return ((IS_DG2 (dev_priv) ||IS_METEORLAKE (dev_priv)) + && dev_priv->display.cdclk.hw.vco >0 + &&HAS_CDCLK_SQUASH (dev_priv)); +} +static void _bxt_set_cdclk (struct drm_i915_private *dev_priv,const struct intel_cdclk_config *cdclk_config,enum pipe pipe)
@@ -1815,9 +1822,12 @@ static void _bxt_set_cdclk(struct drm_i915_private *dev_priv, !cdclk_pll_is_unknown(dev_priv->display.cdclk.hw.vco)) {if (dev_priv->display.cdclk.hw.vco != vco)adlp_cdclk_pll_crawl (dev_priv, vco); - } else if (DISPLAY_VER(dev_priv) >= 11) + } else if (DISPLAY_VER(dev_priv) >= 11) { +if (pll_enable_wa_needed (dev_priv)) +dg2_cdclk_squash_program (dev_priv,0 ); +icl_cdclk_pll_update (dev_priv, vco); - else + } elsebxt_cdclk_pll_update (dev_priv ,vco ); waveform =cdclk_squash_waveform (dev_priv, cdclk);
Signature · 1 line
2.37.3
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Implement workaround for CDCLK PLL disable/enable
== Series Details ==
== Series Details ==
Series: drm/i915: Implement workaround for CDCLK PLL disable/enable
URL : https://patchwork.freedesktop.org/series/113226/
State : warning
== Summary ==
Error: dim checkpatch failed2bf60cdfb1d8 drm/i915: Implement workaround for CDCLK PLL disable/enable -:25: CHECK:LOGICAL_CONTINUATIONS: Logical continuations should be on the previous line #25: FILE: drivers/gpu/drm/i915/display/intel_cdclk.c:1807:
+ return ((IS_DG2(dev_priv) || IS_METEORLAKE(dev_priv))
+ && dev_priv->display.cdclk.hw.vco > 0
-:26: CHECK:LOGICAL_CONTINUATIONS: Logical continuations should be on the previous line #26: FILE: drivers/gpu/drm/i915/display/intel_cdclk.c:1808:
+ && dev_priv->display.cdclk.hw.vco > 0
+ && HAS_CDCLK_SQUASH(dev_priv));
-:43: CHECK:BRACES: Unbalanced braces around else statement #43: FILE: drivers/gpu/drm/i915/display/intel_cdclk.c:1830:
+ } else
total: 0 errors, 0 warnings, 3 checks, 27 lines checked
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Implement workaround for CDCLK PLL disable/enable
In reply to Stanislav Lisovskiy== Series Details ==
== Series Details ==
Series: drm/i915: Implement workaround for CDCLK PLL disable/enable
URL : https://patchwork.freedesktop.org/series/113226/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12624 -> Patchwork_113226v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_113226v1 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_113226v1, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/index.html
Participating hosts (38 -> 38)
------------------------------
Additional (1): fi-pnv-d510
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_113226v1:
### IGT changes ###
#### Possible regressions ####
* igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-dp-2:
- fi-skl-6700k2: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12624/fi-skl-6700k2/igt@kms_pipe_crc_basic@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/fi-skl-6700k2/igt@kms_pipe_crc_basic@[email protected]
Known issues
------------
Here are the changes found in Patchwork_113226v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@execlists:
- fi-bsw-n3050: [PASS][3] -> [INCOMPLETE][4] ([i915#6972] / [i915#7911])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12624/fi-bsw-n3050/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/fi-bsw-n3050/igt@i915_selftest@[email protected]
- fi-bsw-nick: [PASS][5] -> [INCOMPLETE][6] ([i915#7911])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12624/fi-bsw-nick/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/fi-bsw-nick/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@gt_lrc:
- fi-rkl-guc: [PASS][7] -> [INCOMPLETE][8] ([i915#4983])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12624/fi-rkl-guc/igt@i915_selftest@live@gt_lrc.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/fi-rkl-guc/igt@i915_selftest@live@gt_lrc.html
* igt@kms_psr@primary_page_flip:
- fi-pnv-d510: NOTRUN -> [SKIP][9] ([fdo#109271]) +44 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/fi-pnv-d510/igt@kms_psr@primary_page_flip.html
* igt@runner@aborted:
- fi-bsw-n3050: NOTRUN -> [FAIL][10] ([fdo#109271] / [i915#4312])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/fi-bsw-n3050/igt@[email protected]
- fi-bsw-nick: NOTRUN -> [FAIL][11] ([fdo#109271] / [i915#4312])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/fi-bsw-nick/igt@[email protected]
#### Possible fixes ####
* igt@fbdev@write:
- fi-blb-e6850: [SKIP][12] ([fdo#109271]) -> [PASS][13] +4 similar issues
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12624/fi-blb-e6850/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/fi-blb-e6850/igt@[email protected]
* igt@i915_selftest@live@gt_mocs:
- {bat-rpls-1}: [DMESG-FAIL][14] ([i915#7059]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12624/bat-rpls-1/igt@i915_selftest@live@gt_mocs.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/bat-rpls-1/igt@i915_selftest@live@gt_mocs.html
* igt@i915_selftest@live@requests:
- {bat-rpls-2}: [INCOMPLETE][16] ([i915#6257]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12624/bat-rpls-2/igt@i915_selftest@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/bat-rpls-2/igt@i915_selftest@[email protected]
- {bat-rpls-1}: [INCOMPLETE][18] ([i915#4983]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12624/bat-rpls-1/igt@i915_selftest@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/bat-rpls-1/igt@i915_selftest@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions:
- fi-bsw-kefka: [FAIL][20] ([i915#6298]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12624/fi-bsw-kefka/igt@kms_cursor_legacy@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/fi-bsw-kefka/igt@kms_cursor_legacy@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#6257]: https://gitlab.freedesktop.org/drm/intel/issues/6257
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#6972]: https://gitlab.freedesktop.org/drm/intel/issues/6972
[i915#7059]: https://gitlab.freedesktop.org/drm/intel/issues/7059
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#7931]: https://gitlab.freedesktop.org/drm/intel/issues/7931
Build changes
-------------
* Linux: CI_DRM_12624 -> Patchwork_113226v1
CI-20190529: 20190529
CI_DRM_12624: 18fa3d2237f6df82980349f6bef5281096dfc91d @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7134: 61b8c0a0c8a9611c47749c0b1a262843892cccd7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_113226v1: 18fa3d2237f6df82980349f6bef5281096dfc91d @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
053a75699d24 drm/i915: Implement workaround for CDCLK PLL disable/enable
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_113226v1/index.html
Rodrigo Vivi
maintainerQuoted 5 lines · Stanislav Lisovskiy
It was reported that we might get a hung and loss of register access in some cases when CDCLK PLL is disabled and then enabled, while squashing is enabled.
As a workaround it was proposed by HW team that SW should disable squashing when CDCLK PLL is being reenabled.
What's the WA lineage for this WA?
Quoted 42 lines
Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +12
-2@@ -1801,6 +1801,13 @@ static bool cdclk_compute_crawl_and_squash_midpoint(struct drm_i915_private *i91return true; } +static bool pll_enable_wa_needed (struct drm_i915_private *dev_priv) +{ +return ((IS_DG2 (dev_priv) ||IS_METEORLAKE (dev_priv)) + && dev_priv->display.cdclk.hw.vco >0 + &&HAS_CDCLK_SQUASH (dev_priv)); +} +static void _bxt_set_cdclk (struct drm_i915_private *dev_priv,const struct intel_cdclk_config *cdclk_config,enum pipe pipe)@@ -1815,9 +1822,12 @@ static void _bxt_set_cdclk(struct drm_i915_private *dev_priv, !cdclk_pll_is_unknown(dev_priv->display.cdclk.hw.vco)) {if (dev_priv->display.cdclk.hw.vco != vco)adlp_cdclk_pll_crawl (dev_priv, vco); - } else if (DISPLAY_VER(dev_priv) >= 11) + } else if (DISPLAY_VER(dev_priv) >= 11) { +if (pll_enable_wa_needed (dev_priv)) +dg2_cdclk_squash_program (dev_priv,0 ); +icl_cdclk_pll_update (dev_priv, vco); - else + } elsebxt_cdclk_pll_update (dev_priv ,vco ); waveform =cdclk_squash_waveform (dev_priv, cdclk);Signature · 1 line
2.37.3
Quoted 8 lines · Rodrigo Vivi
Quoted 5 lines · Stanislav Lisovskiy
It was reported that we might get a hung and loss of register access in some cases when CDCLK PLL is disabled and then enabled, while squashing is enabled.
As a workaround it was proposed by HW team that SW should disable squashing when CDCLK PLL is being reenabled.What's the WA lineage for this WA?
Not sure, what you mean but HSD is: 14017300873
Stan
Quoted 43 lines
Quoted 43 lines
Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +12
-2@@ -1801,6 +1801,13 @@ static bool cdclk_compute_crawl_and_squash_midpoint(struct drm_i915_private *i91return true; } +static bool pll_enable_wa_needed (struct drm_i915_private *dev_priv) +{ +return ((IS_DG2 (dev_priv) ||IS_METEORLAKE (dev_priv)) + && dev_priv->display.cdclk.hw.vco >0 + &&HAS_CDCLK_SQUASH (dev_priv)); +} +static void _bxt_set_cdclk (struct drm_i915_private *dev_priv,const struct intel_cdclk_config *cdclk_config,enum pipe pipe)@@ -1815,9 +1822,12 @@ static void _bxt_set_cdclk(struct drm_i915_private *dev_priv, !cdclk_pll_is_unknown(dev_priv->display.cdclk.hw.vco)) {if (dev_priv->display.cdclk.hw.vco != vco)adlp_cdclk_pll_crawl (dev_priv, vco); - } else if (DISPLAY_VER(dev_priv) >= 11) + } else if (DISPLAY_VER(dev_priv) >= 11) { +if (pll_enable_wa_needed (dev_priv)) +dg2_cdclk_squash_program (dev_priv,0 ); +icl_cdclk_pll_update (dev_priv, vco); - else + } elsebxt_cdclk_pll_update (dev_priv ,vco ); waveform =cdclk_squash_waveform (dev_priv, cdclk);Signature · 1 line
2.37.3
Rodrigo Vivi
maintainerQuoted 11 lines · Stanislav
Quoted 8 lines · Rodrigo Vivi
Quoted 5 lines · Stanislav Lisovskiy
It was reported that we might get a hung and loss of register access in some cases when CDCLK PLL is disabled and then enabled, while squashing is enabled.
As a workaround it was proposed by HW team that SW should disable squashing when CDCLK PLL is being reenabled.What's the WA lineage for this WA?
Not sure, what you mean but HSD is: 14017300873
For this HSD, the wa lineage one is actually:
Lineage: 15010685871
so you need to add the wa line for reference, something like:
/* wa_15010685871: dg2, mtl */
but looking to the related ones there I don't believe it is yet confirmed to mtl...
although it looks that there's a possibility of this staying for display_ver >= 13....
But more than that I'd like to get someone else from display team to run a deep review on this. Because I see that you are disabling it after the cdclk is locked up.
Quoted 46 lines
Stan
Quoted 43 lines
Quoted 43 lines
Signed-off-by Stanislav Lisovskiy <[email protected]>--- drivers/gpu/drm/i915/display/intel_cdclk.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/display/intel_cdclk.c +12
-2@@ -1801,6 +1801,13 @@ static bool cdclk_compute_crawl_and_squash_midpoint(struct drm_i915_private *i91return true; } +static bool pll_enable_wa_needed (struct drm_i915_private *dev_priv) +{ +return ((IS_DG2 (dev_priv) ||IS_METEORLAKE (dev_priv)) + && dev_priv->display.cdclk.hw.vco >0 + &&HAS_CDCLK_SQUASH (dev_priv)); +} +static void _bxt_set_cdclk (struct drm_i915_private *dev_priv,const struct intel_cdclk_config *cdclk_config,enum pipe pipe)@@ -1815,9 +1822,12 @@ static void _bxt_set_cdclk(struct drm_i915_private *dev_priv, !cdclk_pll_is_unknown(dev_priv->display.cdclk.hw.vco)) {if (dev_priv->display.cdclk.hw.vco != vco)adlp_cdclk_pll_crawl (dev_priv, vco); - } else if (DISPLAY_VER(dev_priv) >= 11) + } else if (DISPLAY_VER(dev_priv) >= 11) { +if (pll_enable_wa_needed (dev_priv)) +dg2_cdclk_squash_program (dev_priv,0 ); +icl_cdclk_pll_update (dev_priv, vco); - else + } elsebxt_cdclk_pll_update (dev_priv ,vco ); waveform =cdclk_squash_waveform (dev_priv, cdclk);Signature · 1 line
2.37.3