Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2711569pxj; Mon, 31 May 2021 08:51:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMD9KlKa4QE3ovQINMpWm7rpE5zbTH7vW6DWmd80ruaZiU+t7OKGxinwMJ7F8cv6DcJkhU X-Received: by 2002:a92:50c:: with SMTP id q12mr16976494ile.166.1622476268026; Mon, 31 May 2021 08:51:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622476268; cv=none; d=google.com; s=arc-20160816; b=BN4egYt3YugZlvu8cbVIoK69o6HE68gsHmEmldfpySIcOMt/8EcdOoQLBI/v+duGp+ /ox89ghwMl0z8i4K0qD+wc8W1PkEGz7tEiKub7YxBJPiFjgjpfhjgPv2RYX0LJ6+zVNe diriAd4beAVNtN0rCQFB5DEC4wFxv+sIe44vF1XRi5slpmA7byLAFDpEu4U+tlwgcVhH ac7t2d/Z3jlV9n5Db6J/8K3PrxCweqB5KsMpZ2saakd6xOTOl6rrhnQqYAmSWntHI041 nqUsyMp48dV/r0szfVZBgQ1sCfZGoS0RfLpj5zFSRFbGwe3dDz3J1N+UPosLBWOKxc77 k83g== 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=6ysy6cuz5wLqKBY4cnx/GZwSVYyViSJJCwsuKIlowKs=; b=KmsgO+OKG74uzHJozPvcwAcRjN4TH6GdiKmAbTMA32zDkm60QDjdy+lS6oApqmNlKX 6sPRaicT7KdZTEMgEhzpdMJipTCTV/2GM2E2p6fxJmnW9OX+q8yPIj7CLkqHV/mdP5f+ pgn794Xr5Zaqvhe1y3QsP4sgYvDfyW6rrVBPxbG6XctJgR7oBT0mNqjaNB6NErHx1N/y rEdEB3eARZHuKfHrHt6kN6wOd2aR8XDpN2peJDGAQRNKW74SaadX82LaIwL9ZiGFujwP o0MluPGcIaRv6uOvZHrh4UidmL0ejgdTaMarGoRixGYifJWQqF0TySka/u533cPoQw+j e7hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kScPhQdo; 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 x9si13099872ilo.119.2021.05.31.08.50.55; Mon, 31 May 2021 08:51:08 -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=kScPhQdo; 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 S232068AbhEaPvT (ORCPT + 99 others); Mon, 31 May 2021 11:51:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:55752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233710AbhEaO3F (ORCPT ); Mon, 31 May 2021 10:29:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3877161421; Mon, 31 May 2021 13:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468884; bh=iTFHOW+j+J+7qE5PeNjpJG59ARpmR1B1eKLj1kqXsnU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kScPhQdoVhceAEPrpj5rYy/c3woDGkcnQ9OFzoJaUw1ssq2NwKGsy+UsFWVWtrsNt z2WRB+pHZSUAywkkNk6q4kf87hyWb/EgmTouwAIPoTdKd9lIbqf8G4dEEvIxUfNAfM pEFgYGrNHQ2haVvO9i2qtozVDGE+CgVQmnJhbtXc= 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.4 131/177] drm/amd/display: Disconnect non-DP with no EDID Date: Mon, 31 May 2021 15:14:48 +0200 Message-Id: <20210531130652.462134267@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@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 40041c61a100..6b03267021ea 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -936,6 +936,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