]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: fix i915_interrupt_info on BDW
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 8 Aug 2014 20:45:32 +0000 (17:45 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 9 Aug 2014 08:57:18 +0000 (10:57 +0200)
Currently, if the machine is runtime suspended an you read the file,
you will get an "Unclaimed register" error message.

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

index 330caa1ab9f92120777f388df3a4d402066e3eca..3b7decbeeed3c548d27e762c30b6e0d4fc62e6a1 100644 (file)
@@ -703,6 +703,12 @@ static int i915_interrupt_info(struct seq_file *m, void *data)
                }
 
                for_each_pipe(pipe) {
+                       if (!intel_display_power_enabled(dev_priv,
+                                               POWER_DOMAIN_PIPE(pipe))) {
+                               seq_printf(m, "Pipe %c power disabled\n",
+                                          pipe_name(pipe));
+                               continue;
+                       }
                        seq_printf(m, "Pipe %c IMR:\t%08x\n",
                                   pipe_name(pipe),
                                   I915_READ(GEN8_DE_PIPE_IMR(pipe)));