summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_debugfs.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2015-05-15 13:09:21 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-05-20 12:25:57 +0300
commit5c1a88754c766b6a66bcd5600de15e4b4baa795a (patch)
tree7cb483b0a5fb7c695f670ca4b0c65c53ba501035 /drivers/gpu/drm/i915/i915_debugfs.c
parent5a1cc6550dc6620e67b792a27da8bbd03a09cafb (diff)
downloadlinux-5c1a88754c766b6a66bcd5600de15e4b4baa795a.tar.xz
drm/i915: Don't read dpcd for disconnected ports
Reading from disconnected ports will spit out timeout error on the dmesg. Skip the attempted read if the port is not connected and avoid confusing users/testcases about expected timeouts. This new dpcd debugfs entry was introduced by commit aa7471d228eb ("drm/i915: add i915 specific connector debugfs file for DPCD") v2 by Jani: move the check at the top, out of the loop. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90060 Tested-by: yex.tian@intel.com Cc: Jani Nikula <jani.nikula@intel.com> Cc: Bob Paauwe <bob.j.paauwe@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index adbbddab42c6..a32b669bab89 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -5154,6 +5154,9 @@ static int i915_dpcd_show(struct seq_file *m, void *data)
ssize_t err;
int i;
+ if (connector->status != connector_status_connected)
+ return -ENODEV;
+
for (i = 0; i < ARRAY_SIZE(i915_dpcd_debug); i++) {
const struct dpcd_block *b = &i915_dpcd_debug[i];
size_t size = b->end ? b->end - b->offset + 1 : (b->size ?: 1);