Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2] tests/intel/i915_pm_rpm: Print reason for skipping PC8 subtest
@ 2026-11-11 10:07 Hiresh Kumar Yadav
  2026-11-11 15:41 ` ✓ i915.CI.BAT: success for tests/intel/i915_pm_rpm: Print reason for skipping PC8 subtest (rev3) Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Hiresh Kumar Yadav @ 2026-11-11 10:07 UTC (permalink / raw)
  To: igt-dev
  Cc: anshuman.gupta, badal.nilawar, riana.tauro, karthik.poosa,
	raag.jadav, soham.purkait, mallesh.koujalagi, sk.anirban,
	Hiresh Kumar Yadav

gem-execbuf-stress-pc8 skips with only "Test requirement: has_pc8",
which doesn't tell the user why PC8+ support is unavailable.

Record the specific reason in setup_pc8() (unsupported platform,
PC8+ residency MSRs not readable, or package C-states limited by
BIOS) and print it when skipping.

v2:
- Drop unreachable skip reason (Anirban)
- Use neutral reason when PC8+ C-states aren't enabled (Anirban)
- Drop cause when residency MSRs are unreadable (Anirban)
- Removed printing platform/codename (Anirban)

Signed-off-by: Hiresh Kumar Yadav <hiresh.kumar.yadav@intel.com>
---
 tests/intel/i915_pm_rpm.c | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/tests/intel/i915_pm_rpm.c b/tests/intel/i915_pm_rpm.c
index b4da27b21..ee5e51c57 100644
--- a/tests/intel/i915_pm_rpm.c
+++ b/tests/intel/i915_pm_rpm.c
@@ -131,6 +131,7 @@ enum plane_type {
 int drm_fd, msr_fd, pc8_status_fd;
 int debugfs;
 bool has_runtime_pm, has_pc8;
+static const char *pc8_skip_reason;
 struct mode_set_data ms_data;
 
 /* Stuff used when creating FBs and mode setting. */
@@ -222,15 +223,24 @@ static bool supports_pc8_plus_residencies(void)
 
 	rc = pread(msr_fd, &val, sizeof(uint64_t), MSR_PC8_RES);
 	if (rc != sizeof(val))
-		return false;
+		goto no_msr;
 	rc = pread(msr_fd, &val, sizeof(uint64_t), MSR_PC9_RES);
 	if (rc != sizeof(val))
-		return false;
+		goto no_msr;
 	rc = pread(msr_fd, &val, sizeof(uint64_t), MSR_PC10_RES);
 	if (rc != sizeof(val))
+		goto no_msr;
+
+	if (!igt_pm_pc8_plus_residencies_enabled(msr_fd)) {
+		pc8_skip_reason = "PC8+ package C-states not enabled";
 		return false;
+	}
 
-	return igt_pm_pc8_plus_residencies_enabled(msr_fd);
+	return true;
+
+no_msr:
+	pc8_skip_reason = "PC8/PC9/PC10 residency MSRs not readable";
+	return false;
 }
 
 static uint64_t get_residency(uint32_t type)
@@ -550,8 +560,10 @@ static void setup_pc8(void)
 	has_pc8 = false;
 
 	/* Only Haswell supports the PC8 feature. */
-	if (!IS_HASWELL(ms_data.devid) && !IS_BROADWELL(ms_data.devid))
+	if (!IS_HASWELL(ms_data.devid) && !IS_BROADWELL(ms_data.devid)) {
+		pc8_skip_reason = "PC8+ residency is only supported on Haswell/Broadwell";
 		return;
+	}
 
 	/* Make sure our Kernel supports MSR and the module is loaded. */
 	igt_require(modprobe("msr") == 0);
@@ -1147,7 +1159,7 @@ gem_execbuf_stress_subtest(int rounds, int wait_flags,
 	igt_require_gem(drm_fd);
 
 	if (wait_flags & WAIT_PC8_RES)
-		igt_require(has_pc8);
+		igt_require_f(has_pc8, "%s\n", pc8_skip_reason);
 
 	i = 0;
 	batch_buf[i++] = MI_NOOP;
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-27 10:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 10:07 [PATCH i-g-t v2] tests/intel/i915_pm_rpm: Print reason for skipping PC8 subtest Hiresh Kumar Yadav
2026-11-11 15:41 ` ✓ i915.CI.BAT: success for tests/intel/i915_pm_rpm: Print reason for skipping PC8 subtest (rev3) Patchwork
2026-11-11 15:41 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-12  0:06 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-11-12  7:31 ` ✗ i915.CI.Full: " Patchwork
2026-11-27 10:23 ` [PATCH i-g-t v2] tests/intel/i915_pm_rpm: Print reason for skipping PC8 subtest Anirban, Sk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox