From patchwork Mon Apr 22 06:33:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Yu, Gareth" X-Patchwork-Id: 13637671 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5CC69C4345F for ; Mon, 22 Apr 2024 06:25:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 989411127D4; Mon, 22 Apr 2024 06:25:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="iz2UrSXb"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8B0D01127D4 for ; Mon, 22 Apr 2024 06:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713767104; x=1745303104; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/CUfAADq1X/ZmsBIyhRRFVeWrcBk3fx+Pmsz3/OTgHM=; b=iz2UrSXbrk9+UZ/KwkvybHA5/VSuD4TwyoSrX5aABsi5h4P3qEZaT7Hj d69eD3lXcehrTRp2j3kk4byqRWZCgXjW11sG9i2qAMbaQBikkE6z2oH/Q W/PR4S3P6dqPXSp5cU8+vEYgTetejaHG+HfLAPHgyNTyUxmXHo5wPCRpM k4uqyonxRUxqvsZ1vo3YRlJYnblef4NjdVU8wpNNZusKjbbk06V4Eh8ya AGCYGiDEqyL7ICn66W84WEl1hgp1DainodNXFFKGMXHCVX6WUmDwBz6D0 lIyk6OumnEUDiHyF+0bb0VXWgOuzhNayRAqX4u53qxPgrHoM6ZBJzdy4y A==; X-CSE-ConnectionGUID: FTHWmR0tRKOWpYNgeO+mKA== X-CSE-MsgGUID: lTDqxR1pTQGb/3wfoLfvPw== X-IronPort-AV: E=McAfee;i="6600,9927,11051"; a="9402501" X-IronPort-AV: E=Sophos;i="6.07,220,1708416000"; d="scan'208";a="9402501" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2024 23:25:03 -0700 X-CSE-ConnectionGUID: QoBncIJ8RT6AsnhSvMOi1A== X-CSE-MsgGUID: pDnD1Ge8Rou5n3FBGNjMSw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,220,1708416000"; d="scan'208";a="24430238" Received: from gyu3-linux.itwn.intel.com ([10.225.64.197]) by orviesa007.jf.intel.com with ESMTP; 21 Apr 2024 23:25:01 -0700 From: gareth.yu@intel.com To: intel-gfx@lists.freedesktop.org Cc: Gareth Yu Subject: [PATCH] drm/i915/display: Fixed the main link lost in MST Date: Mon, 22 Apr 2024 14:33:00 +0800 Message-Id: <20240422063300.1459712-1-gareth.yu@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Gareth Yu Re-train the main link when the sink asserts a HPD for the main lnk lost. Cc : Tejas Upadhyay Cc : Matt Roper Cc : Ville Syrjälä Signed-off-by: Gareth Yu --- drivers/gpu/drm/i915/display/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index e05e25cd4a94..db5d4fa8340b 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -5849,8 +5849,13 @@ intel_dp_detect(struct drm_connector *connector, /* Can't disconnect eDP */ if (intel_dp_is_edp(intel_dp)) status = edp_detect(intel_dp); - else if (intel_digital_port_connected(encoder)) + else if (intel_digital_port_connected(encoder)) { status = intel_dp_detect_dpcd(intel_dp); + if (status == connector_status_connected && intel_dp->is_mst && + !intel_dp_mst_link_status(intel_dp)) + if (intel_dp_retrain_link(encoder, ctx)) + status = connector_status_disconnected; + } else status = connector_status_disconnected;