All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/i915/selftest: Change throttle criteria for rps
@ 2025-01-02 11:06 Raag Jadav
  2025-01-02 11:38 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Raag Jadav @ 2025-01-02 11:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: rodrigo.vivi, andi.shyti, anshuman.gupta, Raag Jadav

Current live_rps_control() implementation errors out on throttling.
This was done with the assumption that throttling to minimum frequency
is a catastrophic failure, which is incorrect. Throttling can happen
due to variety of reasons and often times out of our control. Also,
the resulting frequency can be at any given point below the maximum
allowed. Change throttle criteria to reflect this logic and drop the
error, as it doesn't necessarily mean selftest failure.

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

diff --git a/drivers/gpu/drm/i915/gt/selftest_rps.c b/drivers/gpu/drm/i915/gt/selftest_rps.c
index dcef8d498919..7aac90c1679e 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rps.c
+++ b/drivers/gpu/drm/i915/gt/selftest_rps.c
@@ -477,12 +477,13 @@ int live_rps_control(void *arg)
 			limit, intel_gpu_freq(rps, limit),
 			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);
+		if (limit != rps->max_freq) {
+			u32 throttle = intel_uncore_read(gt->uncore,
+							 intel_gt_perf_limit_reasons_reg(gt));
+
+			pr_warn("%s: GPU throttled with reasons 0x%08x\n",
+				engine->name, throttle & GT0_PERF_LIMIT_REASONS_MASK);
 			show_pstate_limits(rps);
-			err = -ENODEV;
-			break;
 		}
 
 		if (igt_flush_test(gt->i915)) {
-- 
2.34.1


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

end of thread, other threads:[~2025-01-12  7:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-02 11:06 [PATCH v1] drm/i915/selftest: Change throttle criteria for rps Raag Jadav
2025-01-02 11:38 ` ✓ i915.CI.BAT: success for " Patchwork
2025-01-02 13:22 ` ✓ i915.CI.Full: " Patchwork
2025-01-08  9:28 ` [PATCH v1] " Raag Jadav
2025-01-09 19:04   ` Rodrigo Vivi
2025-01-09 18:59 ` Belgaumkar, Vinay
2025-01-11 20:41 ` Andi Shyti
2025-01-12  7:34   ` Raag Jadav

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.