Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2671222pxj; Mon, 31 May 2021 07:55:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzW9v90vBp5j+gzY5/2tn4qxZHGtQoLFrGM8hNhmkw+16qAAyYhjU+RoMgXW60GR6s3aavw X-Received: by 2002:a05:6e02:104b:: with SMTP id p11mr18436120ilj.275.1622472914547; Mon, 31 May 2021 07:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622472914; cv=none; d=google.com; s=arc-20160816; b=hze5Zg/vUeUnqWOfkMta8GWkWW/yj2F3iJo9WzukZPh16AQ/sUyPXDdDtPlQT8uD2n XTMljhsbZ5orlYGqZqE3XzJPBd40AXNKqHXP4LOEN6UDhVS04/Ur4oeR5w8mnvw8JcBX 7svQ4QLcgK6+g5U3uVkVxoghUFkKc8GFCr9HXILkwbCMJ8X3mT5G41e6VQkuVB5DrQpC 7dokRhWZQSBT+IM8EEhBnFOzArPri5Bw1wFYwJxN+y6X0s9LKFFi2u9nUggwzNeQNL7d 9VHvaiu+sU0pe30NVC2waAlERdqV7TzL4LRC2Es/+LydHsUrqOibgIZqnlZBMZnWeIlc JF9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=z0QbF1q2kIImR9NAEmylcXhgKllwXZy4UVv8BBE6VZw=; b=Obi+va57I/Xz5tIHaRKaqyEf8ff3PAT6vgdnAhI4ht+5UX+fNjqX0ieSwEvfLIsDl9 uAZJFl1lIUH33XitGmNSz3Lt+NyRvz0CirFNjFhk0fTX7rb6SyUO7Z9LNbWYqT1LyjFP VdgYzXvxt/H2e+lV9sOELQTfH/xAJ6+wlEcp1YsGyYeCATLK480pHlPqZzSq2Ll+FfUv RqfQpDJxITA+74dWLXDHa4FLFg7Ck1qPa9LZnl9TRKU3pxLd2GdMA8NtyxzGjt6wd8Kj p+Tvtn1VpHxx4j6cvNdO+FfrH1/xIftTVQstNuUQknPfBoIhFCPsLyJp7p8KDAVs7Rqn 0hRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HhMYZqp0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j10si13047914iom.77.2021.05.31.07.55.00; Mon, 31 May 2021 07:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HhMYZqp0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232320AbhEaOz3 (ORCPT + 99 others); Mon, 31 May 2021 10:55:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:37386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232212AbhEaOD5 (ORCPT ); Mon, 31 May 2021 10:03:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F20C1613C1; Mon, 31 May 2021 13:37:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468274; bh=p9SOPVhR3hgFauLpHcLifRt5AajZWHwWV4bCa9HFucs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HhMYZqp0ejVYr5db15BRPuyaz193KjOWDLyHW8gywVzmP0m7m5vrNcZ3SHRxQyUHv EW847IXMLbLItsgVMPNCIp2uAK5SGxj+tRA+DcEbb70miCPst3GpxYuJQyogZjTCbU Llz1s1J0Lc1V86zo1DBdKU/nFcblrUFV0WnuQAic= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chris Park , Nicholas Kazlauskas , Stylon Wang , Daniel Wheeler , Alex Deucher , Sasha Levin Subject: [PATCH 5.10 181/252] drm/amd/display: Disconnect non-DP with no EDID Date: Mon, 31 May 2021 15:14:06 +0200 Message-Id: <20210531130704.161056012@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chris Park [ Upstream commit 080039273b126eeb0185a61c045893a25dbc046e ] [Why] Active DP dongles return no EDID when dongle is connected, but VGA display is taken out. Current driver behavior does not remove the active display when this happens, and this is a gap between dongle DTP and dongle behavior. [How] For active DP dongles and non-DP scenario, disconnect sink on detection when no EDID is read due to timeout. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index f0039599e02f..62778ccea055 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -1049,6 +1049,24 @@ static bool dc_link_detect_helper(struct dc_link *link, dc_is_dvi_signal(link->connector_signal)) { if (prev_sink) dc_sink_release(prev_sink); + link_disconnect_sink(link); + + return false; + } + /* + * Abort detection for DP connectors if we have + * no EDID and connector is active converter + * as there are no display downstream + * + */ + if (dc_is_dp_sst_signal(link->connector_signal) && + (link->dpcd_caps.dongle_type == + DISPLAY_DONGLE_DP_VGA_CONVERTER || + link->dpcd_caps.dongle_type == + DISPLAY_DONGLE_DP_DVI_CONVERTER)) { + if (prev_sink) + dc_sink_release(prev_sink); + link_disconnect_sink(link); return false; } -- 2.30.2