Skip to content

Commit 98479ad

Browse files
icklerodrigovivi
authored andcommitted
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+ (cherry picked from commit 21abf0b) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent a24c57d commit 98479ad

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

775788
void intel_rps_boost(struct i915_request *rq)

0 commit comments

Comments
 (0)