diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-20 09:47:08 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-20 12:40:29 +0000 |
commit | 76e4e4b532bc9f289039c569063ec4b2e0ef2cc4 (patch) | |
tree | 14c804b38bf4eb1b1653e53e32c700ac26c91aaa /drivers/gpu/drm/i915/intel_pm.c | |
parent | cfd1c48805208b1f1d5f4df153a15fa4a280eb54 (diff) | |
download | op-kernel-dev-76e4e4b532bc9f289039c569063ec4b2e0ef2cc4.zip op-kernel-dev-76e4e4b532bc9f289039c569063ec4b2e0ef2cc4.tar.gz |
drm/i915: Store the requested frequency whilst RPS is disabled
If intel_set_rps() is called whilst the hw is disabled, just store the
requested frequency (from the user) for application when we wake the hw
up.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170220094713.22874-2-chris@chris-wilson.co.uk
Reviewed-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index e1878cb..af11c40 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5105,6 +5105,11 @@ int intel_set_rps(struct drm_i915_private *dev_priv, u8 val) GEM_BUG_ON(val > dev_priv->rps.max_freq); GEM_BUG_ON(val < dev_priv->rps.min_freq); + if (!dev_priv->rps.enabled) { + dev_priv->rps.cur_freq = val; + return 0; + } + if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) err = valleyview_set_rps(dev_priv, val); else |