drm/i915: Fix crash after S3 resume with DP MST mode change

Submitted by Takashi Iwai on March 30, 2017, 5:02 p.m.


Message ID 20170330170257.6331-1-tiwai@suse.de
State New
Headers show
Series "drm/i915: Fix crash after S3 resume with DP MST mode change" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Takashi Iwai March 30, 2017, 5:02 p.m.
We've got a bug report showing that Skylake Dell machines with a
docking station causes a kernel panic after S3 resume and modeset.
The details are found in the openSUSE bugzilla entry below.  The
typical test procedure is:

- Laptop is Dell Latitude with eDP (1366x768)
- Boot with docking station connected to a DP (1920x1080)
- Login, change the mode via
  xrandr --output eDP-1 --auto --output DP-1-1 --auto --left-of eDP-1
- Suspend, and close the lid after the suspend
  (or close the lid to trigger the suspend)
- Undock while keeping the lid closed.
- Open the lid, which triggers the resume;
  the machine wakes up well, and X shows up.  No problem, so far.
- Suspend again, close the lid.
- Dock again while keeping the lid closed.
- Open the lid, triggering the resume; this wakes up still fine.
- At this moment, run xrandr again to re-setup DP-1
  xrandr --output eDP-1 --auto --output DP-1-1 --auto --left-of eDP-1
  ==> This triggers a hard crash.

I could bisect it, and this leaded to the commit a16b7658f4e0
("drm/i915: Call intel_dp_mst_resume() before resuming displays").

Unfortunately, no crash dump / log could be taken because the machine
gets screwed up including the whole network stack when it hits this
problem, and neither kdump nor netconsole worked.  So, currently it's
still pretty unclear what really happened.

But, eventually I found a workaround: just skip
drm_dp_mst_topology_mgr_resume() calls in intel_dp_mst_resume().
They should be handled in hpd later in anyway, so we can skip them

This patch addresses the crash by the workaround above; for a
completeness, the failed resume port is still logged in the debug

v1->v2: just ignore the drm_dp_mst_topology_mgr_resume() error codes
        instead of postponing.

Fixes: a16b7658f4e0 ("drm/i915: Call intel_dp_mst_resume() before resuming displays")
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1029634
Reviewed-by: Lyude <lyude@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
 drivers/gpu/drm/i915/intel_dp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index d1670b8afbf5..a6c0f0ac16eb 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -6041,6 +6041,7 @@  void intel_dp_mst_resume(struct drm_device *dev)
 		ret = drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr);
 		if (ret)
-			intel_dp_check_mst_status(&intel_dig_port->dp);
+			DRM_DEBUG_KMS("DP MST resume failed for port-%c\n",
+				      port_name(intel_dig_port->port));