Skip to content

Commit 3f88dde

Browse files
committed
drm/i915/gt: Apply the aggressive downclocking to parking
We treat parking as a manual RPS timeout event, and downclock the GPU for the next unpark and batch execution. However, having restored the aggressive downclocking and observed that we have very light workloads whose only interaction is through the manual parking events, carry over the aggressive downclocking to the fake RPS events. References: 21abf0b ("drm/i915/gt: Treat idling as a RPS downclock event") Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 36d516b commit 3f88dde

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -822,8 +822,6 @@ void intel_rps_unpark(struct intel_rps *rps)
822822
rps->min_freq_softlimit,
823823
rps->max_freq_softlimit));
824824

825-
rps->last_adj = 0;
826-
827825
mutex_unlock(&rps->lock);
828826

829827
rps->pm_iir = 0;
@@ -838,6 +836,8 @@ void intel_rps_unpark(struct intel_rps *rps)
838836

839837
void intel_rps_park(struct intel_rps *rps)
840838
{
839+
int adj;
840+
841841
if (!intel_rps_clear_active(rps))
842842
return;
843843

@@ -876,8 +876,13 @@ void intel_rps_park(struct intel_rps *rps)
876876
* (Note we accommodate Cherryview's limitation of only using an
877877
* even bin by applying it to all.)
878878
*/
879-
rps->cur_freq =
880-
max_t(int, round_down(rps->cur_freq - 1, 2), rps->min_freq);
879+
adj = rps->last_adj;
880+
if (adj < 0)
881+
adj *= 2;
882+
else /* CHV needs even encode values */
883+
adj = -2;
884+
rps->last_adj = adj;
885+
rps->cur_freq = max_t(int, rps->cur_freq + adj, rps->min_freq);
881886

882887
GT_TRACE(rps_to_gt(rps), "park:%x\n", rps->cur_freq);
883888
}

0 commit comments

Comments
 (0)