[Intel-gfx] [PATCH v2 1/1] drm/i915: Update only cur_freq without setting RPNSWREQ when device is suspended

Sagar Arun Kamble sagar.a.kamble at intel.com
Mon Oct 24 06:38:57 UTC 2016


If min/max frequency is updated from debugfs/sysfs and device is
suspended, just update the driver tracking state cur_freq and it will
come into effect when HW becomes busy next.

v2: Folded awake check into if/else. (Jon)

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble at intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 560fc7a..96dbce5 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5114,7 +5114,11 @@ void gen6_rps_boost(struct drm_i915_private *dev_priv,
 
 void intel_set_rps(struct drm_i915_private *dev_priv, u8 val)
 {
-	if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
+	lockdep_assert_held(&dev_priv->rps.hw_lock);
+
+	if (!dev_priv->gt.awake)
+		dev_priv->rps.cur_freq = val;
+	else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
 		valleyview_set_rps(dev_priv, val);
 	else
 		gen6_set_rps(dev_priv, val);
-- 
1.9.1



More information about the Intel-gfx mailing list