drm/i915: Prevent kernel panic when reading/writing compliance debugfs files, v2.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 26 Jun 2017 08:18:35 +0000 (10:18 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 3 Jul 2017 12:07:04 +0000 (14:07 +0200)
commita874b6a3fb22c8c30f36b1f6ba5430a4c2278a6a
treea9dfd749078333ca3aa56d5aee2f02fdeaa94b8d
parent987f8c444aa2c33d98e7030d0c5f0a5325cc84ea
drm/i915: Prevent kernel panic when reading/writing compliance debugfs files, v2.

When reading all debugfs files on a system with DP-MST the kernel panics
on a null pointer dereference because intel_dp is null for a DP-MST
connector. Detect this case and skip those connectors.

Also fix the write for the DP compliance file in the same way.

Changes since v1:
- Fix i915_displayport_test_active_write too. (DK)

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170626081835.24251-1-maarten.lankhorst@linux.intel.com
drivers/gpu/drm/i915/i915_debugfs.c