drm/i915: Disable RPG during live selftest
Subsystems (2)
PATCH v3 1/1 drm/i915: Disable RPG during live selftest
The Forcewake timeout issue has been observed on Gen 12.0 and above. To address this, disable Render Power-Gating (RPG) during live self-tests for these generations. The temporary workaround 'drm/i915/mtl: do not enable render power-gating on MTL' disables RPG globally, which is unnecessary since the issues were only seen during self-tests.
v2: take runtime pm wakeref
--- drivers/gpu/drm/i915/gt/intel_rc6.c | 19 ++++--------------- .../gpu/drm/i915/selftests/i915_selftest.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/gt/intel_rc6.c +4 -15
@@ -117,21 +117,10 @@ static void gen11_rc6_enable(struct intel_rc6 *rc6)GEN6_RC_CTL_RC6_ENABLE |GEN6_RC_CTL_EI_MODE (1 ); -/* -* BSpec 52698 - Render powergating must be off. -* FIXME BSpec is outdated, disabling powergating for MTL is just -* temporary wa and should be removed after fixing real cause -* of forcewake timeouts. -*/ -if (IS_GFX_GT_IP_RANGE (gt,IP_VER (12 ,70 ),IP_VER (12 ,74 ))) - pg_enable = -GEN9_MEDIA_PG_ENABLE | -GEN11_MEDIA_SAMPLER_PG_ENABLE ; -else - pg_enable = -GEN9_RENDER_PG_ENABLE | -GEN9_MEDIA_PG_ENABLE | -GEN11_MEDIA_SAMPLER_PG_ENABLE ; + pg_enable = +GEN9_RENDER_PG_ENABLE | +GEN9_MEDIA_PG_ENABLE | +GEN11_MEDIA_SAMPLER_PG_ENABLE ;if (GRAPHICS_VER (gt->i915) >=12 && !IS_DG1 (gt->i915)) {for (i =0 ; i <I915_MAX_VCS ; i++)
drivers/gpu/drm/i915/selftests/i915_selftest.c +18 -0
@@ -23,7 +23,9 @@#include <linux/random.h> +#include "gt/intel_gt.h" #include "gt/intel_gt_pm.h" +#include "gt/intel_gt_regs.h" #include "gt/uc/intel_gsc_fw.h" #include "i915_driver.h"
@@ -253,11 +255,27 @@ int i915_mock_selftests(void)int i915_live_selftests (struct pci_dev *pdev) {struct drm_i915_private *i915 =pdev_to_i915 (pdev); +struct intel_uncore *uncore = &i915->uncore;int err; +u32 pg_enable; +intel_wakeref_t wakeref;if (!i915_selftest.live)return 0 ; +/* +* FIXME Disable render powergating, this is temporary wa and should be removed +* after fixing real cause of forcewake timeouts. +*/ + with_intel_runtime_pm(uncore->rpm, wakeref) { +if (IS_GFX_GT_IP_RANGE (to_gt (i915),IP_VER (12 ,00 ),IP_VER (12 ,74 ))) { + pg_enable =intel_uncore_read (uncore,GEN9_PG_ENABLE ); +if (pg_enable &GEN9_RENDER_PG_ENABLE ) +intel_uncore_write_fw (uncore,GEN9_PG_ENABLE , + pg_enable & ~GEN9_RENDER_PG_ENABLE ); + } + } +__wait_gsc_proxy_completed (i915);__wait_gsc_huc_load_completed (i915);
Signature · 1 line
2.34.1
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for drm/i915: Disable RPG during live selftest (rev2)
== Series Details ==
== Series Details ==
Series: drm/i915: Disable RPG during live selftest (rev2)
URL : https://patchwork.freedesktop.org/series/143886/
State : warning
== Summary ==
Error: dim checkpatch failed01853816d099 drm/i915: Disable RPG during live selftest
-:6: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?) #6:
The Forcewake timeout issue has been observed on Gen 12.0 and above. To address this,
total: 0 errors, 1 warnings, 0 checks, 61 lines checked
Patchwork
CI✗ i915.CI.BAT: failure for drm/i915: Disable RPG during live selftest (rev2)
In reply to Badal Nilawar== Series Details ==
== Series Details ==
Series: drm/i915: Disable RPG during live selftest (rev2)
URL : https://patchwork.freedesktop.org/series/143886/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_16017 -> Patchwork_143886v2
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_143886v2 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_143886v2, please notify your bug team ([email protected]) 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_143886v2/index.html
Participating hosts (37 -> 36)
------------------------------
Additional (1): bat-apl-1
Missing (2): bat-adlp-6 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_143886v2:
### IGT changes ###
#### Possible regressions ####
* igt@gem_lmem_swapping@parallel-random-engines:
- bat-dg2-9: [PASS][1] -> [ABORT][2] +1 other test abort
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16017/bat-dg2-9/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/bat-dg2-9/igt@[email protected]
* igt@i915_selftest@live@workarounds:
- bat-dg2-11: [PASS][3] -> [DMESG-FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16017/bat-dg2-11/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/bat-dg2-11/igt@i915_selftest@[email protected]
Known issues
------------
Here are the changes found in Patchwork_143886v2 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@dmabuf@all-tests@dma_fence_chain:
- fi-bsw-nick: [PASS][5] -> [INCOMPLETE][6] ([i915#12904]) +1 other test incomplete
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16017/fi-bsw-nick/igt@dmabuf@all-tests@dma_fence_chain.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/fi-bsw-nick/igt@dmabuf@all-tests@dma_fence_chain.html
* igt@i915_pm_rpm@module-reload:
- bat-rpls-4: [PASS][7] -> [FAIL][8] ([i915#13401])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16017/bat-rpls-4/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/bat-rpls-4/igt@[email protected]
- bat-adls-6: [PASS][9] -> [FAIL][10] ([i915#13401])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16017/bat-adls-6/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/bat-adls-6/igt@[email protected]
* igt@i915_selftest@live:
- bat-dg2-11: [PASS][11] -> [DMESG-FAIL][12] ([i915#12435])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16017/bat-dg2-11/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/bat-dg2-11/igt@[email protected]
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: [PASS][13] -> [SKIP][14] ([i915#9197]) +3 other tests skip
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16017/bat-dg2-11/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/bat-dg2-11/igt@[email protected]
* igt@kms_pm_backlight@basic-brightness:
- bat-apl-1: NOTRUN -> [SKIP][15] +23 other tests skip
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/bat-apl-1/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@workarounds:
- bat-arlh-2: [DMESG-FAIL][16] ([i915#12061]) -> [PASS][17] +1 other test pass
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16017/bat-arlh-2/igt@i915_selftest@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/bat-arlh-2/igt@i915_selftest@[email protected]
- {bat-arls-6}: [DMESG-FAIL][18] ([i915#12061]) -> [PASS][19] +1 other test pass
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16017/bat-arls-6/igt@i915_selftest@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/bat-arls-6/igt@i915_selftest@[email protected]
* igt@kms_chamelium_edid@hdmi-edid-read:
- bat-dg2-13: [DMESG-WARN][20] ([i915#12253]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16017/bat-dg2-13/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/bat-dg2-13/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#12253]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12253
[i915#12435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12435
[i915#12904]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12904
[i915#13401]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13401
[i915#9197]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9197
Build changes
-------------
* Linux: CI_DRM_16017 -> Patchwork_143886v2
CI-20190529: 20190529
CI_DRM_16017: 897537fb818365733977947214c799d61675895f @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8207: 9f36f9f9e8825a67b762630c2b31628ddcda5c10 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_143886v2: 897537fb818365733977947214c799d61675895f @ git://anongit.freedesktop.org/gfx-ci/linux
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v2/index.html
Rodrigo Vivi
maintainerQuoted 69 lines · Badal Nilawar
The Forcewake timeout issue has been observed on Gen 12.0 and above. To address this, disable Render Power-Gating (RPG) during live self-tests for these generations. The temporary workaround 'drm/i915/mtl: do not enable render power-gating on MTL' disables RPG globally, which is unnecessary since the issues were only seen during self-tests.
v2: take runtime pm wakeref
Fixes 25e7976db86b ("drm/i915/mtl: do not enable render power-gating on MTL")Cc Rodrigo Vivi <[email protected]>Cc Andi Shyti <[email protected]>Cc Andrzej Hajda <[email protected]>Signed-off-by Badal Nilawar <[email protected]>--- drivers/gpu/drm/i915/gt/intel_rc6.c | 19 ++++--------------- .../gpu/drm/i915/selftests/i915_selftest.c | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/gt/intel_rc6.c +4
-15@@ -117,21 +117,10 @@ static void gen11_rc6_enable(struct intel_rc6 *rc6)GEN6_RC_CTL_RC6_ENABLE |GEN6_RC_CTL_EI_MODE (1 ); -/* -* BSpec 52698 - Render powergating must be off. -* FIXME BSpec is outdated, disabling powergating for MTL is just -* temporary wa and should be removed after fixing real cause -* of forcewake timeouts. -*/ -if (IS_GFX_GT_IP_RANGE (gt,IP_VER (12 ,70 ),IP_VER (12 ,74 ))) - pg_enable = -GEN9_MEDIA_PG_ENABLE | -GEN11_MEDIA_SAMPLER_PG_ENABLE ; -else - pg_enable = -GEN9_RENDER_PG_ENABLE | -GEN9_MEDIA_PG_ENABLE | -GEN11_MEDIA_SAMPLER_PG_ENABLE ; + pg_enable = +GEN9_RENDER_PG_ENABLE | +GEN9_MEDIA_PG_ENABLE | +GEN11_MEDIA_SAMPLER_PG_ENABLE ;if (GRAPHICS_VER (gt->i915) >=12 && !IS_DG1 (gt->i915)) {for (i =0 ; i <I915_MAX_VCS ; i++)drivers/gpu/drm/i915/selftests/i915_selftest.c +4
-0@@ -23,7 +23,9 @@#include <linux/random.h> +#include "gt/intel_gt.h" #include "gt/intel_gt_pm.h" +#include "gt/intel_gt_regs.h" #include "gt/uc/intel_gsc_fw.h" #include "i915_driver.h" @@ -253,11 +255,27 @@ int i915_mock_selftests(void)int i915_live_selftests (struct pci_dev *pdev) {struct drm_i915_private *i915 =pdev_to_i915 (pdev); +struct intel_uncore *uncore = &i915->uncore;int err; +u32 pg_enable;
drivers/gpu/drm/i915/selftests/i915_selftest.c int i915_mock_selftests(void) · line 270
Quoted 10 lines
drivers/gpu/drm/i915/selftests/i915_selftest.c +6
-0+intel_wakeref_t wakeref;if (!i915_selftest.live)return 0 ; +/* +* FIXME Disable render powergating, this is temporary wa and should be removed +* after fixing real cause of forcewake timeouts. +*/ + with_intel_runtime_pm(uncore->rpm, wakeref) {
We probably need to take the runtime pm reference in upper layers...
CI is mad around runtime pm on selftests with this patch.
drivers/gpu/drm/i915/selftests/i915_selftest.c int i915_mock_selftests(void) · line 275
Quoted 5 lines
drivers/gpu/drm/i915/selftests/i915_selftest.c +5
-0+if (IS_GFX_GT_IP_RANGE (to_gt (i915),IP_VER (12 ,00 ),IP_VER (12 ,74 ))) { + pg_enable =intel_uncore_read (uncore,GEN9_PG_ENABLE ); +if (pg_enable &GEN9_RENDER_PG_ENABLE ) +intel_uncore_write_fw (uncore,GEN9_PG_ENABLE , + pg_enable & ~GEN9_RENDER_PG_ENABLE );
We also are facing some repeated GPU hangs on selftests with this, so we probably cannot blindly disable here?
I know our CI oscilates some time, but when different attempts gets same results there, then we really need to believe it...
Quoted 9 lines
drivers/gpu/drm/i915/selftests/i915_selftest.c +3
-0+ } + } +__wait_gsc_proxy_completed (i915);__wait_gsc_huc_load_completed (i915);Signature · 1 line
2.34.1