Skip to content

Commit 9ef80ee

Browse files
raagjadavAndi Shyti
authored andcommitted
drm/i915/selftest: Change throttle criteria for rps
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 <[email protected]> Reviewed-by: Vinay Belgaumkar <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Acked-by: Rodrigo Vivi <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6f0572f commit 9ef80ee

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/gpu/drm/i915/gt/selftest_rps.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -477,12 +477,13 @@ int live_rps_control(void *arg)
477477
limit, intel_gpu_freq(rps, limit),
478478
min, max, ktime_to_ns(min_dt), ktime_to_ns(max_dt));
479479

480-
if (limit == rps->min_freq) {
481-
pr_err("%s: GPU throttled to minimum!\n",
482-
engine->name);
480+
if (limit != rps->max_freq) {
481+
u32 throttle = intel_uncore_read(gt->uncore,
482+
intel_gt_perf_limit_reasons_reg(gt));
483+
484+
pr_warn("%s: GPU throttled with reasons 0x%08x\n",
485+
engine->name, throttle & GT0_PERF_LIMIT_REASONS_MASK);
483486
show_pstate_limits(rps);
484-
err = -ENODEV;
485-
break;
486487
}
487488

488489
if (igt_flush_test(gt->i915)) {

0 commit comments

Comments
 (0)