]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/i915: Show the DPCD read error inline
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 10 Oct 2018 08:17:06 +0000 (09:17 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 10 Oct 2018 10:01:57 +0000 (11:01 +0100)
When reporting the DPCD dump through debugfs, show the errors inline
where appropriate. If a read at one particular offset fails, report it.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106371
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181010081706.29931-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_debugfs.c

index 4565eda29c87be6b11340d886eb42390a2a55481..00c551d3e4099c4befdc5a70c837c02509b5e068 100644 (file)
@@ -4915,13 +4915,10 @@ static int i915_dpcd_show(struct seq_file *m, void *data)
                        continue;
 
                err = drm_dp_dpcd_read(&intel_dp->aux, b->offset, buf, size);
-               if (err <= 0) {
-                       DRM_ERROR("dpcd read (%zu bytes at %u) failed (%zd)\n",
-                                 size, b->offset, err);
-                       continue;
-               }
-
-               seq_printf(m, "%04x: %*ph\n", b->offset, (int) size, buf);
+               if (err < 0)
+                       seq_printf(m, "%04x: ERROR %d\n", b->offset, (int)err);
+               else
+                       seq_printf(m, "%04x: %*ph\n", b->offset, (int)err, buf);
        }
 
        return 0;