From patchwork Thu Mar 30 17:02:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 9654847 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 572B6602BD for ; Thu, 30 Mar 2017 17:03:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 447BF285C8 for ; Thu, 30 Mar 2017 17:03:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 393D3285CC; Thu, 30 Mar 2017 17:03:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B9E03285C8 for ; Thu, 30 Mar 2017 17:03:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C4D816E91E; Thu, 30 Mar 2017 17:03:09 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id 740DE6E91E for ; Thu, 30 Mar 2017 17:03:08 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id DB377AD33; Thu, 30 Mar 2017 17:03:06 +0000 (UTC) From: Takashi Iwai To: Daniel Vetter , Jani Nikula Date: Thu, 30 Mar 2017 19:02:57 +0200 Message-Id: <20170330170257.6331-1-tiwai@suse.de> X-Mailer: git-send-email 2.11.1 Cc: intel-gfx@lists.freedesktop.org, Lyude Paul Subject: [Intel-gfx] [PATCH] drm/i915: Fix crash after S3 resume with DP MST mode change X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Signed-off-by: Takashi Iwai --- drivers/gpu/drm/i915/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); } }