Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2625584pxj; Mon, 31 May 2021 06:52:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyO9OX8whfz0xSRXDmFJk3+XfNl53jiFiLdzZn6G0hEdEfuvYJvgbR5rrp87nHWcPZEDWq X-Received: by 2002:a92:1909:: with SMTP id 9mr17811399ilz.229.1622469125787; Mon, 31 May 2021 06:52:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622469125; cv=none; d=google.com; s=arc-20160816; b=kwRCM7d5FS2cAqEQ8wxQ6RPOaN4ZvTHZpfA7ADK5prWYHSf7R1SdSI8H/3Fm+5LC2k 9JHTVSbsKKNJq3Rnh5+f1eSOuK/dPKEw7WIE6hWx20S7LjNQPGQ4cY0K1kRAeE0HuQir romHi18xJLdT2a2yqXHzZAoXJM/ASYbhDJmj6Gi8+VFDDl+XjuQ8e0UCMlPsKJb2m5BQ r2WF6UMr1qiNetZzVcOwPx4Q3gB+t2Ub6PE1CiHgM8sg1S70Iqma8MGkwuplu8+LXt8k Fa2bhzYPhEWGK4gT8S+xv9cZiuI4CETYwGTIBygsKqxriFNRWhdgFQxJr8PwOzW/+Ftb rtOg== 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=cCNLPFhbQ4L6HtzgbA7cspiqt2IvFrV75Z1mtokrrUk=; b=V1Rw2KgtAOtZvLC60+8AcYwG1KlqdpgB9IcIpjTeHgHKgCxJMJiyHyc86rIV6YR73z vlx//nI1gnNVLLtUu7AKJu45WuOcG9ZYUQBYSZBkPXgoAoBnEceUeGioiR7UVJIPT5Wo GVemaQG+b5/6tXyKStj3sNH6o5iE/IIqZVsfG3zJdx5p4XnoMp7wWDKax7XPuiQIhzpQ mt+blzaTmw2a4BtG9oIRchaKj+ZDbbrwHQs1pb7yFP91pkjmVj+I2Vq1ELZGXhV2RXlg OsU3ve8X82nIDttvG30FooB0S9oTL85f8ute8dvvn3CTrHkkbbmnRCLyeDK+fn+eZWav oqJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qSkY0TyX; 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 a11si1631793jap.60.2021.05.31.06.51.52; Mon, 31 May 2021 06:52:05 -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=qSkY0TyX; 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 S231983AbhEaNvi (ORCPT + 99 others); Mon, 31 May 2021 09:51:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:39080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232351AbhEaNfU (ORCPT ); Mon, 31 May 2021 09:35:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DD3A961446; Mon, 31 May 2021 13:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467513; bh=FK3fUDXpICiejRWxVpW85Y1P4eQTuIDtcgzrL8ccIio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qSkY0TyXQu764U0GaGC/jsW1DLOleImr+fbXK8UZgaxAXsKg4rtikG9o1L1RcPmYq e1M4yP7ZlXn4e4GomGFNg533Pc7prraaQACl/uVA3WSv+jwA69S46oa1niKhfasOo9 SVTASkRKNWLnPDWNJ4GWJ5SqTBm5oWbgjHsG2G00= 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 4.19 093/116] drm/amd/display: Disconnect non-DP with no EDID Date: Mon, 31 May 2021 15:14:29 +0200 Message-Id: <20210531130643.292075200@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130640.131924542@linuxfoundation.org> References: <20210531130640.131924542@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 e3bedf4cc9c0..c9c81090d580 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -768,6 +768,24 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) dc_is_dvi_signal(link->connector_signal)) { if (prev_sink != NULL) 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