From patchwork Wed Oct 24 02:19:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juston Li X-Patchwork-Id: 10654033 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3AE0013A9 for ; Wed, 24 Oct 2018 02:22:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FDF32A119 for ; Wed, 24 Oct 2018 02:22:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 23E812A5C8; Wed, 24 Oct 2018 02:22:34 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 D94542A119 for ; Wed, 24 Oct 2018 02:22:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A7856E12B; Wed, 24 Oct 2018 02:22:33 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3C85B6E131; Wed, 24 Oct 2018 02:22:31 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2018 19:22:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,418,1534834800"; d="scan'208";a="102098596" Received: from jhli-desk1.jf.intel.com ([10.7.198.167]) by orsmga001.jf.intel.com with ESMTP; 23 Oct 2018 19:22:30 -0700 From: Juston Li To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Tue, 23 Oct 2018 19:19:25 -0700 Message-Id: <20181024021925.27026-3-juston.li@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181024021925.27026-1-juston.li@intel.com> References: <20181024021925.27026-1-juston.li@intel.com> Subject: [Intel-gfx] [RESEND PATCH v2 2/2] drm/i915/mst: Reset MST after resume when necessary X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mario.limonciello@dell.com, linux-kernel@vger.kernel.org, nathan.d.ciobanu@intel.com, jared_dominguez@dell.com, stable@vger.kernel.org, Lyude MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Lyude 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 Signed-off-by: Juston Li --- drivers/gpu/drm/i915/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 8c38efef77a1..cb5ffec73094 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -6793,7 +6793,12 @@ void intel_dp_mst_resume(struct drm_i915_private *dev_priv) continue; ret = drm_dp_mst_topology_mgr_resume(&intel_dp->mst_mgr); - if (ret) + /* A full reset is required */ + if (ret == -EINVAL) { + drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr, false); + intel_dp_configure_mst(intel_dp); + } else if (ret != 0) { intel_dp_check_mst_status(intel_dp); + } } }