[PATCH v1] drm/i915/selftest: Log throttle reasons on failure

Raag Jadav raag.jadav at intel.com
Thu Dec 5 08:14:13 UTC 2024


Log throttle reasons on selftest failure which will be useful for
debugging.

Signed-off-by: Raag Jadav <raag.jadav at intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_rps.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_rps.c b/drivers/gpu/drm/i915/gt/selftest_rps.c
index dcef8d498919..1e0e59bc69b6 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rps.c
+++ b/drivers/gpu/drm/i915/gt/selftest_rps.c
@@ -478,8 +478,11 @@ int live_rps_control(void *arg)
 			min, max, ktime_to_ns(min_dt), ktime_to_ns(max_dt));
 
 		if (limit == rps->min_freq) {
-			pr_err("%s: GPU throttled to minimum!\n",
-			       engine->name);
+			u32 throttle = intel_uncore_read(gt->uncore,
+							 intel_gt_perf_limit_reasons_reg(gt));
+
+			pr_err("%s: GPU throttled to minimum frequency with reasons 0x%08x\n",
+			       engine->name, throttle & GT0_PERF_LIMIT_REASONS_MASK);
 			show_pstate_limits(rps);
 			err = -ENODEV;
 			break;
-- 
2.34.1



More information about the Intel-gfx mailing list