diff mbox

[1/4,v2] drm/i915: Early exit from rps worker if GPU is idle

Message ID 1463495069-30705-1-git-send-email-michal.winiarski@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

MichaƂ Winiarski May 17, 2016, 2:24 p.m. UTC
This allows us to avoid the situation where worker is increasing the GPU
frequency after we've switched to idle.

v2: Do not access ->mm.busy under ->irq_lock

References: https://bugs.freedesktop.org/show_bug.cgi?id=89728
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Micha? Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index f0d9414..0344f4a 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1096,6 +1096,9 @@  static void gen6_pm_rps_work(struct work_struct *work)
 		return;
 	}
 
+	if (!dev_priv->mm.busy)
+		return;
+
 	/*
 	 * The RPS work is synced during runtime suspend, we don't require a
 	 * wakeref. TODO: instead of disabling the asserts make sure that we