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.

Signed-off-by: Chris Wilson <[email protected]>
Signed-off-by: Sagar Arun Kamble <[email protected]>
---
 drivers/gpu/drm/i915/intel_pm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 5d39ad2..57ded11 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -5064,6 +5064,13 @@ void gen6_rps_boost(struct drm_i915_private *dev_priv,
 
 void intel_set_rps(struct drm_i915_private *dev_priv, u8 val)
 {
+       lockdep_assert_held(&dev_priv->rps.hw_lock);
+
+       if (!dev_priv->gt.awake) {
+               dev_priv->rps.cur_freq = val;
+               return;
+       }
+
        if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
                valleyview_set_rps(dev_priv, val);
        else
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to