Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/slpc: Optmize waitboost for SLPC
@ 2022-10-18 22:15 Vinay Belgaumkar
  2022-10-18 23:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Vinay Belgaumkar @ 2022-10-18 22:15 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Waitboost (when SLPC is enabled) results in a H2G message. This can result
in thousands of messages during a stress test and fill up an already full
CTB. There is no need to request for RP0 if GuC is already requesting the
same.

Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_rps.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c
index fc23c562d9b2..a20ae4fceac8 100644
--- a/drivers/gpu/drm/i915/gt/intel_rps.c
+++ b/drivers/gpu/drm/i915/gt/intel_rps.c
@@ -1005,13 +1005,20 @@ void intel_rps_dec_waiters(struct intel_rps *rps)
 void intel_rps_boost(struct i915_request *rq)
 {
 	struct intel_guc_slpc *slpc;
+	struct intel_rps *rps = &READ_ONCE(rq->engine)->gt->rps;
 
 	if (i915_request_signaled(rq) || i915_request_has_waitboost(rq))
 		return;
 
+	/* If GuC is already requesting RP0, skip */
+	if (rps_uses_slpc(rps)) {
+		slpc = rps_to_slpc(rps);
+		if (intel_rps_get_requested_frequency(rps) == slpc->rp0_freq)
+			return;
+	}
+
 	/* Serializes with i915_request_retire() */
 	if (!test_and_set_bit(I915_FENCE_FLAG_BOOST, &rq->fence.flags)) {
-		struct intel_rps *rps = &READ_ONCE(rq->engine)->gt->rps;
 
 		if (rps_uses_slpc(rps)) {
 			slpc = rps_to_slpc(rps);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-10-20  8:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-18 22:15 [Intel-gfx] [PATCH] drm/i915/slpc: Optmize waitboost for SLPC Vinay Belgaumkar
2022-10-18 23:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-10-19  7:40 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2022-10-19 21:12   ` Belgaumkar, Vinay
2022-10-19 23:05     ` Belgaumkar, Vinay
2022-10-20  8:14     ` Tvrtko Ursulin
2022-10-19 13:30 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox