Skip to contentSkip to conversation

drm/i915: Disable RPG during live selftest

PATCH Superseded Badal Nilawar 2 participants 3 messages Jan 23, 2025

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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.

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]>
---
 drivers/gpu/drm/i915/gt/intel_rc6.c           | 19 ++++---------------
 .../gpu/drm/i915/selftests/i915_selftest.c    | 14 ++++++++++++++
 2 files changed, 18 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/gt/intel_rc6.c +4 -15
index 9378d5901c49..9ca42589da4d 100644
@@ -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 +14 -0
index fee76c1d2f45..6aabbfde0695 100644
@@ -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"
@@ -254,10 +256,22 @@ int i915_live_selftests(struct pci_dev *pdev)
 {
 	struct drm_i915_private *i915 = pdev_to_i915(pdev);
 	int err;
+	u32 pg_enable;
 
 	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.
+	 */
+	if (IS_GFX_GT_IP_RANGE(to_gt(i915), IP_VER(12, 00), IP_VER(12, 74))) {
+		pg_enable = intel_uncore_read(&i915->uncore, GEN9_PG_ENABLE);
+		if (pg_enable & GEN9_RENDER_PG_ENABLE)
+			intel_uncore_write_fw(&i915->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
#1 lore raw

✗ Fi.CI.CHECKPATCH: warning for drm/i915: Disable RPG during live selftest

== Series Details ==

== Series Details ==

Series: drm/i915: Disable RPG during live selftest
URL : https://patchwork.freedesktop.org/series/143886/
State : warning

== Summary ==

Error: dim checkpatch failed
5f796f393df5 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,

-:79: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #79: FILE: drivers/gpu/drm/i915/selftests/i915_selftest.c:272:
+ intel_uncore_write_fw(&i915->uncore, GEN9_PG_ENABLE,
+ pg_enable & ~GEN9_RENDER_PG_ENABLE);

total: 0 errors, 1 warnings, 1 checks, 56 lines checked

#2 lore raw

✗ i915.CI.BAT: failure for drm/i915: Disable RPG during live selftest

In reply to Badal Nilawar
== Series Details ==

== Series Details ==

Series: drm/i915: Disable RPG during live selftest
URL : https://patchwork.freedesktop.org/series/143886/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_16008 -> Patchwork_143886v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_143886v1 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in Patchwork_143886v1, 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_143886v1/index.html

Participating hosts (39 -> 38)
------------------------------

Missing (1): fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_143886v1:

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live:
- bat-adlp-11: [PASS][1] -> [ABORT][2] +1 other test abort
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-adlp-11/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-adlp-11/igt@[email protected]
- bat-dg1-6: [PASS][3] -> [ABORT][4] +1 other test abort
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-dg1-6/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-dg1-6/igt@[email protected]
- bat-dg2-8: [PASS][5] -> [ABORT][6] +1 other test abort
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-dg2-8/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-dg2-8/igt@[email protected]
- bat-adls-6: [PASS][7] -> [ABORT][8] +1 other test abort
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-adls-6/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-adls-6/igt@[email protected]
- fi-tgl-1115g4: [PASS][9] -> [ABORT][10] +1 other test abort
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/fi-tgl-1115g4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/fi-tgl-1115g4/igt@[email protected]
- bat-dg1-7: [PASS][11] -> [ABORT][12] +1 other test abort
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-dg1-7/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-dg1-7/igt@[email protected]
- bat-adlp-9: [PASS][13] -> [ABORT][14] +1 other test abort
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-adlp-9/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-adlp-9/igt@[email protected]
- bat-dg2-11: [PASS][15] -> [ABORT][16] +1 other test abort
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-dg2-11/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-dg2-11/igt@[email protected]
- bat-rpls-4: [PASS][17] -> [ABORT][18] +1 other test abort
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-rpls-4/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-rpls-4/igt@[email protected]

* igt@i915_selftest@live@sanitycheck:
- bat-dg2-14: [PASS][19] -> [ABORT][20] +1 other test abort
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-dg2-14/igt@i915_selftest@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-dg2-14/igt@i915_selftest@[email protected]
- fi-rkl-11600: [PASS][21] -> [ABORT][22] +1 other test abort
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/fi-rkl-11600/igt@i915_selftest@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/fi-rkl-11600/igt@i915_selftest@[email protected]
- bat-dg2-9: [PASS][23] -> [ABORT][24] +1 other test abort
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-dg2-9/igt@i915_selftest@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-dg2-9/igt@i915_selftest@[email protected]

Known issues
------------

Here are the changes found in Patchwork_143886v1 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@i915_pm_rpm@module-reload:
- bat-dg2-11: [PASS][25] -> [FAIL][26] ([i915#13401])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-dg2-11/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-dg2-11/igt@[email protected]

* igt@i915_selftest@live:
- bat-mtlp-8: [PASS][27] -> [DMESG-FAIL][28] ([i915#12061]) +1 other test dmesg-fail
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-mtlp-8/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-mtlp-8/igt@[email protected]
- bat-adlp-6: [PASS][29] -> [ABORT][30] ([i915#13399]) +1 other test abort
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-adlp-6/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-adlp-6/igt@[email protected]
- bat-arlh-3: [PASS][31] -> [DMESG-FAIL][32] ([i915#12061] / [i915#12435])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-arlh-3/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-arlh-3/igt@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-arlh-3: [PASS][33] -> [DMESG-FAIL][34] ([i915#12061])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-arlh-3/igt@i915_selftest@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-arlh-3/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: [PASS][35] -> [SKIP][36] ([i915#9197]) +3 other tests skip
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-dg2-11/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-dg2-11/igt@[email protected]

#### Possible fixes ####

* igt@i915_module_load@load:
- {bat-mtlp-9}: [DMESG-WARN][37] -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-mtlp-9/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-mtlp-9/igt@[email protected]

* igt@i915_selftest@live@workarounds:
- bat-arls-5: [DMESG-FAIL][39] ([i915#12061]) -> [PASS][40] +1 other test pass
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-arls-5/igt@i915_selftest@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-arls-5/igt@i915_selftest@[email protected]
- {bat-mtlp-9}: [DMESG-FAIL][41] ([i915#12061]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16008/bat-mtlp-9/igt@i915_selftest@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/bat-mtlp-9/igt@i915_selftest@[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#12435]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12435
[i915#13399]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13399
[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_16008 -> Patchwork_143886v1

CI-20190529: 20190529
CI_DRM_16008: a5cc7d87c1d8de0391edd40d4b7e2ba7c1da0f5b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8207: 9f36f9f9e8825a67b762630c2b31628ddcda5c10 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_143886v1: a5cc7d87c1d8de0391edd40d4b7e2ba7c1da0f5b @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_143886v1/index.html