Received: by 10.223.185.111 with SMTP id b44csp822795wrg; Fri, 9 Mar 2018 14:33:23 -0800 (PST) X-Google-Smtp-Source: AG47ELumBLph1iOFrgsUWHfk52Hej2+MsaWkS2f9MPm3XNrgqllT633kwzQ7ifbtf+cyyfE+OxfJ X-Received: by 10.98.102.155 with SMTP id s27mr76452pfj.198.1520634803147; Fri, 09 Mar 2018 14:33:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520634803; cv=none; d=google.com; s=arc-20160816; b=hBp4NXlITAV0UWWu+fY9QDrR6QWglDnZhhGlf4Wh7xqmPI0/fQ6owrcod5O4my4RW5 iWLU349tt+FRJrQ0ATSkuriRruIGq8kFu6ruv7frwlCuM6Zp96PFGNcKGhZXkM+osK+U bSTZp/mtCGcCMPKKdL01IwH4B0C4GELbYd7gVM1yTcTQ91fY4soj4eTYqybbH3DDhaRl ZVpYfA+3Ufj93ZAp2gmILMeXDGTpkVgZNymWCWm1+HH1o0Bt9i88qc1u/kaS+EPT3KNf tS1aSPd8mx1p6FqCzhDw2JMV83jWVn0/RiMhqd7raY7XTWti8TY1Gkz+ip9rpS/tSJJW Cw9Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=eqKVtMuJGwOqxvyEgciXUWUNqzAnvbYDQ2MT2/pz90g=; b=fVyy2zhGmyqsmyvLCuQRrp7U/vs0meJ7gPlG67o0SwCDWtsGHLwKHLIpFkQtWEHfbw XEL2RUmoaOipfYz1o3GrtQf93CY4T5xn3xg3pb4rqhvWMTZmRBCgWFcSNWQyitgfMWCL cFCBdFNneLaZKoP26VZUPx6oPH74/5ohm8u5I38zR9ynrj9ZNepFQrVkojGnpqEihRGl cXVTCz2EoaM54jIsWC88YOse+Iulq5bldIYcln5qjwRq28R7/Gej9MSLpkHGEPoRLbsJ aCcP0IHvzinRfbi9wR1m6odwuWsu2CDGA6AGonvfNQ/1A3n7mvn/b3lpSt/RCcNEuq9S KP8A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10si1350204pgr.822.2018.03.09.14.33.08; Fri, 09 Mar 2018 14:33:23 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932979AbeCIWcS (ORCPT + 99 others); Fri, 9 Mar 2018 17:32:18 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42496 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932932AbeCIWYN (ORCPT ); Fri, 9 Mar 2018 17:24:13 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 23C7227561A From: Enric Balletbo i Serra To: architt@codeaurora.org, inki.dae@samsung.com, thierry.reding@gmail.com, hjc@rock-chips.com, seanpaul@chromium.org, airlied@linux.ie, tfiga@chromium.org, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, dianders@chromium.org, a.hajda@samsung.com, ykk@rock-chips.com, kernel@collabora.com, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, rydberg@bitmath.org, krzk@kernel.org, linux-rockchip@lists.infradead.org, kgene@kernel.org, linux-input@vger.kernel.org, orjan.eide@arm.com, wxt@rock-chips.com, jeffy.chen@rock-chips.com, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com, wzz@rock-chips.com, hl@rock-chips.com, jingoohan1@gmail.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, Laurent.pinchart@ideasonboard.com, kuankuan.y@gmail.com, hshi@chromium.org, =?UTF-8?q?St=C3=A9phane=20Marchesin?= , Enric Balletbo i Serra Subject: [PATCH v5 11/36] drm/bridge: analogix_dp: Wait for HPD signal before configuring link Date: Fri, 9 Mar 2018 23:23:02 +0100 Message-Id: <20180309222327.18689-12-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180309222327.18689-1-enric.balletbo@collabora.com> References: <20180309222327.18689-1-enric.balletbo@collabora.com> 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: zain wang According to DP spec v1.3 chap 3.5.1.2 Link Training, Link Policy Maker must first detect that the HPD signal is asserted high by the Downstream Device before establishing a link with it. Cc: Stéphane Marchesin Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Tested-by: Marek Szyprowski --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index c81733b8185e..92fb9a072cb6 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1169,6 +1169,17 @@ static int analogix_dp_set_bridge(struct analogix_dp_device *dp) if (ret) goto out_dp_init; + /* + * According to DP spec v1.3 chap 3.5.1.2 Link Training, + * We should first make sure the HPD signal is asserted high by device + * when we want to establish a link with it. + */ + ret = analogix_dp_detect_hpd(dp); + if (ret) { + DRM_ERROR("failed to get hpd single ret = %d\n", ret); + goto out_dp_init; + } + ret = analogix_dp_commit(dp); if (ret) goto out_dp_init; -- 2.16.1