LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 1004-drm-i915-Fix-crash-after-S3-resume-with-DP-MST-mode-.patch of Package drm (Project home:tiwai:bnc1050256)

From 0d1b24073237eb78b5229f10b3ca0845f06fe2cb Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 29 Mar 2017 14:49:25 +0200
Subject: [PATCH] drm/i915: Fix crash after S3 resume with DP MST mode change
References: bsc#1029634
Patch-mainline: Submitted, intel-gfx ML

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
gracefully.

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

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(-)

--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5906,6 +5906,7 @@ void intel_dp_mst_resume(struct drm_devi
 
 		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));
 	}
 }