Re: [Intel-gfx] [RFC 4/4] drm/i915: Expose RPS thresholds in sysfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 28/04/2023 09:14, Tvrtko Ursulin wrote:
From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

User feedback indicates significant performance gains are possible in
specific games with non default RPS up/down thresholds.

Expose these tunables via sysfs which will allow users to achieve best
performance when running games and best power efficiency elsewhere.

Note this patch supports non GuC based platforms only.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
References: https://gitlab.freedesktop.org/drm/intel/-/issues/8389

[snip]

diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c
index a5a7315f5ace..f790e81546ff 100644
--- a/drivers/gpu/drm/i915/gt/intel_rps.c
+++ b/drivers/gpu/drm/i915/gt/intel_rps.c
@@ -2588,7 +2588,12 @@ static int rps_set_threshold(struct intel_rps *rps, u8 *threshold, u8 val)
  	ret = mutex_lock_interruptible(&rps->lock);
  	if (ret)
  		return ret;
-	*threshold = val;
+	if (*threshold != val) {
+		*threshold = val;
+		intel_rps_set(rps, clamp(rps->cur_freq,
+					 rps->min_freq_softlimit,
+					 rps->max_freq_softlimit));
+	}
  	mutex_unlock(&rps->lock);
return 0;

This hunk belongs to a previous patch - moved locally.

Regards,

Tvrtko



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux