]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/gpu/drm/i915/i915_sysfs.c
drm/i915: get a runtime PM ref for debugfs entries where needed
[mirror_ubuntu-artful-kernel.git] / drivers / gpu / drm / i915 / i915_sysfs.c
index 9c57029f6f4b4b9ba6b63ce2493eac4942f5eb59..3620997e43f50bd3089f760cc2a50e374a6fd502 100644 (file)
@@ -263,6 +263,8 @@ static ssize_t gt_cur_freq_mhz_show(struct device *kdev,
 
        flush_delayed_work(&dev_priv->rps.delayed_resume_work);
 
+       intel_runtime_pm_get(dev_priv);
+
        mutex_lock(&dev_priv->rps.hw_lock);
        if (IS_VALLEYVIEW(dev_priv->dev)) {
                u32 freq;
@@ -273,6 +275,8 @@ static ssize_t gt_cur_freq_mhz_show(struct device *kdev,
        }
        mutex_unlock(&dev_priv->rps.hw_lock);
 
+       intel_runtime_pm_put(dev_priv);
+
        return snprintf(buf, PAGE_SIZE, "%d\n", ret);
 }