drm/i915: get/put runtime PM at i915_semaphore_status
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>
This commit is contained in:
parent
9ccd5aeb29
commit
03872064f7
@ -2314,6 +2314,7 @@ static int i915_semaphore_status(struct seq_file *m, void *unused)
|
|||||||
ret = mutex_lock_interruptible(&dev->struct_mutex);
|
ret = mutex_lock_interruptible(&dev->struct_mutex);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
intel_runtime_pm_get(dev_priv);
|
||||||
|
|
||||||
if (IS_BROADWELL(dev)) {
|
if (IS_BROADWELL(dev)) {
|
||||||
struct page *page;
|
struct page *page;
|
||||||
@ -2363,6 +2364,7 @@ static int i915_semaphore_status(struct seq_file *m, void *unused)
|
|||||||
}
|
}
|
||||||
seq_putc(m, '\n');
|
seq_putc(m, '\n');
|
||||||
|
|
||||||
|
intel_runtime_pm_put(dev_priv);
|
||||||
mutex_unlock(&dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user