Skip to content

Commit 21abf0b

Browse files
committed
drm/i915/gt: Treat idling as a RPS downclock event
If we park/unpark faster than we can respond to RPS events, we never will process a downclock event after expiring a waitboost, and thus we will forever restart the GPU at max clocks even if the workload switches and doesn't justify full power. Closes: https://gitlab.freedesktop.org/drm/intel/issues/1500 Fixes: 3e7abf8 ("drm/i915: Extract GT render power state management") Signed-off-by: Chris Wilson <[email protected]> Cc: Andi Shyti <[email protected]> Cc: Lyude Paul <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Cc: <[email protected]> # v5.5+
1 parent bb6892b commit 21abf0b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,19 @@ void intel_rps_park(struct intel_rps *rps)
771771
intel_uncore_forcewake_get(rps_to_uncore(rps), FORCEWAKE_MEDIA);
772772
rps_set(rps, rps->idle_freq, false);
773773
intel_uncore_forcewake_put(rps_to_uncore(rps), FORCEWAKE_MEDIA);
774+
775+
/*
776+
* Since we will try and restart from the previously requested
777+
* frequency on unparking, treat this idle point as a downclock
778+
* interrupt and reduce the frequency for resume. If we park/unpark
779+
* more frequently than the rps worker can run, we will not respond
780+
* to any EI and never see a change in frequency.
781+
*
782+
* (Note we accommodate Cherryview's limitation of only using an
783+
* even bin by applying it to all.)
784+
*/
785+
rps->cur_freq =
786+
max_t(int, round_down(rps->cur_freq - 1, 2), rps->min_freq);
774787
}
775788

776789
void intel_rps_boost(struct i915_request *rq)

0 commit comments

Comments
 (0)