Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1586662ybv; Thu, 20 Feb 2020 23:47:59 -0800 (PST) X-Google-Smtp-Source: APXvYqxM+xI8eCOAHkRfH2dp/yyG4JXHv5riUj86UzPLSz3wUYpGaQzv3ENrrjlU9OrOVSYdJqRs X-Received: by 2002:a9d:3f4b:: with SMTP id m69mr25159130otc.146.1582271279809; Thu, 20 Feb 2020 23:47:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582271279; cv=none; d=google.com; s=arc-20160816; b=IHPaZOI+FnZzYOI1lLcEkU6Y6QSnmbYyjW3upWbpcp/kMPdWeFYm4ka20j8EZlNJjC nSETGmNDrxF4snFSMYSPQC2sdVnkGzlPsvWEAVWZfoOSz4GZa3aw/bNGhIr9a9shjrDW SPIMlX1sl7+dPvuZLv4GVM1RWf41F1Q/E1EDC7o2guOFkDkRbqbqNgJ+grVV2qU7lYz0 sb2sCvrpTF/n0OPA5KnMwsJMrOIe+o2g7JvZx73hq5Bz5g5NjFBUAh+0iYwgYw/CPXbG JKq1EdGFnJdEhXcPLBKdJvVOKl/D8ZzFrxT5WgWX7CCOpd7AaAtE/FoEeV2ftidO1q94 hMGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7+TcA4Wx07sPrKpHgYyrLOXx0UC70w3xSyahBXTcnoo=; b=kf0bKVT76WdEi1n4n3Q2JC1ZpiHgSWLtZOtsYRG3/2NS4Yqna1OTDhDlXupNGCcqDn dw6R8kgtEzNeWlHb/dhm4WYDjhMWgDsdgnuCHPOgf0OI5pUosjD9ESt5f9tjpx2CRUU1 4SfIa/CjQ2o0kR47dCeVLY2GANlgWlXKyoUfWafaRVq4PXsSRE2KKEgFbhRh/xfePq/O m0CGK4uk+E6NxLnzHeC90hrI3mBcWrUcLIrGKSx8w3C+Bztq4jLQgOv5vpiCx5Ayankg 5wxrsoK4q9ica/BMDU+Zd2oXCsyysO3CGtQHgsa40759iig/uv/89qRXOhe7QUurwdRG ZC7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WZLrCG6H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p26si1055788oto.240.2020.02.20.23.47.47; Thu, 20 Feb 2020 23:47:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WZLrCG6H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728910AbgBUHr0 (ORCPT + 99 others); Fri, 21 Feb 2020 02:47:26 -0500 Received: from mail.kernel.org ([198.145.29.99]:43178 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728901AbgBUHrX (ORCPT ); Fri, 21 Feb 2020 02:47:23 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 287F2222C4; Fri, 21 Feb 2020 07:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582271242; bh=v9kgbTRLSbsOE/FA6v/8+h7+wnByHJqRW7CwIyvCXio=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WZLrCG6HVhkcxIjdlGz/Q9zpkkyEUxuBxh64TYcycG7mQ4f0VJEAitQxQtvXco3aR VhzRl1a7Sv97aAJRBf1d/aLBMqwLFSacBvnFiqM2xhKUw1nJwiYdg5eUwvpPi2+/UJ fibyoG/KDkDf5LnQQ49H411ezwEkvxLBjeWkXR/8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Louis Li , Wenjing Liu , Hersen Wu , Eric Yang , Harry Wentland , Alex Deucher , Sasha Levin Subject: [PATCH 5.5 092/399] drm/amd/display: Retrain dongles when SINK_COUNT becomes non-zero Date: Fri, 21 Feb 2020 08:36:57 +0100 Message-Id: <20200221072411.287157032@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072402.315346745@linuxfoundation.org> References: <20200221072402.315346745@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Harry Wentland [ Upstream commit 3eb6d7aca53d81ce888624f09cd44dc0302161e8 ] [WHY] Two years ago the patch referenced by the Fixes tag stopped running dp_verify_link_cap_with_retries during DP detection when the reason for the detection was a short-pulse interrupt. This effectively meant that we were no longer doing the verify_link_cap training on active dongles when their SINK_COUNT changed from 0 to 1. A year ago this was partly remedied with: commit 80adaebd2d41 ("drm/amd/display: Don't skip link training for empty dongle") This made sure that we trained the dongle on initial hotplug (without connected downstream devices). This is all fine and dandy if it weren't for the fact that there are some dongles on the market that don't like link training when SINK_COUNT is 0 These dongles will in fact indicate a SINK_COUNT of 0 immediately after hotplug, even when a downstream device is connected, and then trigger a shortpulse interrupt indicating a SINK_COUNT change to 1. In order to play nicely we will need our policy to not link train an active DP dongle when SINK_COUNT is 0 but ensure we train it when the SINK_COUNT changes to 1. [HOW] Call dp_verify_link_cap_with_retries on detection even when the detection is triggered from a short pulse interrupt. With this change we can also revert this commit which we'll do in a separate follow-up change: commit 80adaebd2d41 ("drm/amd/display: Don't skip link training for empty dongle") Fixes: 0301ccbaf67d ("drm/amd/display: DP Compliance 400.1.1 failure") Suggested-by: Louis Li Tested-by: Louis Li Cc: Wenjing Liu Cc: Hersen Wu Cc: Eric Yang Reviewed-by: Wenjing Liu Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 4619f94f0ac78..70846ae7d854d 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -968,8 +968,7 @@ static bool dc_link_detect_helper(struct dc_link *link, same_edid = is_same_edid(&prev_sink->dc_edid, &sink->dc_edid); if (link->connector_signal == SIGNAL_TYPE_DISPLAY_PORT && - sink_caps.transaction_type == DDC_TRANSACTION_TYPE_I2C_OVER_AUX && - reason != DETECT_REASON_HPDRX) { + sink_caps.transaction_type == DDC_TRANSACTION_TYPE_I2C_OVER_AUX) { /* * TODO debug why Dell 2413 doesn't like * two link trainings -- 2.20.1