From patchwork Thu May 19 14:19:56 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: cpaul@redhat.com X-Patchwork-Id: 9127723 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 30AA760467 for ; Thu, 19 May 2016 14:20:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23DCF2808F for ; Thu, 19 May 2016 14:20:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18D01281C5; Thu, 19 May 2016 14:20:15 +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]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D5CE82808F for ; Thu, 19 May 2016 14:20:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AB5DD6E9A7; Thu, 19 May 2016 14:20:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 15D9B6E948; Thu, 19 May 2016 14:20:09 +0000 (UTC) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A748D7AE91; Thu, 19 May 2016 14:20:08 +0000 (UTC) Received: from ecstaticemu.bos.redhat.com (dhcp-25-142.bos.redhat.com [10.18.25.142]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4JEK6iv009688; Thu, 19 May 2016 10:20:07 -0400 From: Lyude To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Dave Airlie Subject: [PATCH 2/2] drm/i915/mst: Reset MST after resume when necessary Date: Thu, 19 May 2016 10:19:56 -0400 Message-Id: <1463667596-25236-2-git-send-email-cpaul@redhat.com> In-Reply-To: <1463667596-25236-1-git-send-email-cpaul@redhat.com> References: <1463667596-25236-1-git-send-email-cpaul@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 19 May 2016 14:20:08 +0000 (UTC) Cc: Daniel Vetter , Lyude , stable@vger.kernel.org, open list X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP A follow-up to the previous commit, we skip checking the status of the MST device and completely reprobe it if drm_dp_mst_topology_mgr_resume() returns -EINVAL. Cc: stable@vger.kernel.org Signed-off-by: Lyude --- drivers/gpu/drm/i915/intel_dp.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index db6a0fd..5b62f7e 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -6063,6 +6063,7 @@ void intel_dp_mst_suspend(struct drm_device *dev) void intel_dp_mst_resume(struct drm_device *dev) { struct drm_i915_private *dev_priv = dev->dev_private; + struct drm_dp_mst_topology_mgr *mgr; int i; for (i = 0; i < I915_MAX_PORTS; i++) { @@ -6075,8 +6076,14 @@ void intel_dp_mst_resume(struct drm_device *dev) if (!intel_dig_port->dp.can_mst) continue; - ret = drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr); - if (ret != 0) { + mgr = &intel_dig_port->dp.mst_mgr; + + ret = drm_dp_mst_topology_mgr_resume(mgr); + /* A full reset is required */ + if (ret == -EINVAL) { + drm_dp_mst_topology_mgr_set_mst(mgr, false); + intel_dp_probe_mst(&intel_dig_port->dp); + } else if (ret != 0) { intel_dp_check_mst_status(&intel_dig_port->dp); } }