]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/i915: get/put runtime PM at i915_semaphore_status
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Wed, 9 Jul 2014 17:31:57 +0000 (14:31 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 10 Jul 2014 06:30:06 +0000 (08:30 +0200)
Otherwise we will print some WARNs when we read registers and the
machine is suspended.

Testcase: igt/pm_rpm/debugfs-read
Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c

index 394519182510d3e1e50ae959951f8ca375d2051f..952f19949be1f5ad7d4857058cd57502b2b3fbf0 100644 (file)
@@ -2314,6 +2314,7 @@ static int i915_semaphore_status(struct seq_file *m, void *unused)
        ret = mutex_lock_interruptible(&dev->struct_mutex);
        if (ret)
                return ret;
+       intel_runtime_pm_get(dev_priv);
 
        if (IS_BROADWELL(dev)) {
                struct page *page;
@@ -2363,6 +2364,7 @@ static int i915_semaphore_status(struct seq_file *m, void *unused)
        }
        seq_putc(m, '\n');
 
+       intel_runtime_pm_put(dev_priv);
        mutex_unlock(&dev->struct_mutex);
        return 0;
 }