diff options
author | Imre Deak <imre.deak@intel.com> | 2014-04-14 13:24:27 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-05-05 03:08:55 -0400 |
commit | d46c05175e0da37ad2795c775161f15302ce6c89 (patch) | |
tree | c356d78429bc67dbad023894027f2f57a2968e53 /drivers/gpu/drm/i915/i915_sysfs.c | |
parent | 3b2c1bfe20da09301965f0acb82d3012a568dc83 (diff) |
drm/i915: get a runtime PM ref for debugfs entries where needed
These debugfs entries access registers that need the D0 power state so
get an RPM ref for them.
v2:
- for all these entries we only need D0 state, so get only an RPM ref,
not a power domain ref (Daniel, Paulo)
- the dpio entry is not an issue any more as it got removed (Ville)
- restore commit message from v1 (Paulo)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_sysfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_sysfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c index 9c57029f6f4b..3620997e43f5 100644 --- a/drivers/gpu/drm/i915/i915_sysfs.c +++ b/drivers/gpu/drm/i915/i915_sysfs.c | |||
@@ -263,6 +263,8 @@ static ssize_t gt_cur_freq_mhz_show(struct device *kdev, | |||
263 | 263 | ||
264 | flush_delayed_work(&dev_priv->rps.delayed_resume_work); | 264 | flush_delayed_work(&dev_priv->rps.delayed_resume_work); |
265 | 265 | ||
266 | intel_runtime_pm_get(dev_priv); | ||
267 | |||
266 | mutex_lock(&dev_priv->rps.hw_lock); | 268 | mutex_lock(&dev_priv->rps.hw_lock); |
267 | if (IS_VALLEYVIEW(dev_priv->dev)) { | 269 | if (IS_VALLEYVIEW(dev_priv->dev)) { |
268 | u32 freq; | 270 | u32 freq; |
@@ -273,6 +275,8 @@ static ssize_t gt_cur_freq_mhz_show(struct device *kdev, | |||
273 | } | 275 | } |
274 | mutex_unlock(&dev_priv->rps.hw_lock); | 276 | mutex_unlock(&dev_priv->rps.hw_lock); |
275 | 277 | ||
278 | intel_runtime_pm_put(dev_priv); | ||
279 | |||
276 | return snprintf(buf, PAGE_SIZE, "%d\n", ret); | 280 | return snprintf(buf, PAGE_SIZE, "%d\n", ret); |
277 | } | 281 | } |
278 | 282 | ||