Received: by 10.213.65.68 with SMTP id h4csp1742656imn; Thu, 5 Apr 2018 03:03:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx48eLVdNcr+g2BHn2vuIzizve1rP/0wGIfh8wlPowOJydzmK9y4tVOp7btm6ch+TLZvDdfTz X-Received: by 10.98.11.144 with SMTP id 16mr16598637pfl.228.1522922624852; Thu, 05 Apr 2018 03:03:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522922624; cv=none; d=google.com; s=arc-20160816; b=0gfs/ytTwkqFtT7GQD2Ww8EFzgPI72cVyqQQzg77EYJ6cuK+528UJ6BqCw7DRGDB7N yxCpTk7gcoWBeFJiMGuh2IU4+L5pGCON10dRpZdvnuCREcd1j+yMx/c0C9eqvmJ18RBu bs8hZWPuRr9Tgb3M2LWuGJkgaNlBHQglZEXlSxZpc4SB7Bvc919yDjzu0qrpiHM6+T3H 8xI1gmhp7AtBKa5LSBYqqpC0Vfg7FRY9S5ulW+3Ecjh+Esu2Zdr/U727eK2sqJ8+kPsG XyAT9Df+bPH49N4Q7+e63+OCit4uRz3kjAiHHYu2Be3NLeF6WoOn7UNHtWzm0hIzX5+S kkwQ== 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=J3Xd1oNI2SOwVrba2UqAzqpIirAjjvg5kjlrOmD2CFU=; b=c+jW/NAVtE2806tUT9rRD0WemfS3h2jlOaeWVHyTJurRlp22qywnQyGIHWhkOGeixc pY2FgqZj5LB2ihKwvuvS3j4JHSvVs2VcgwmiAYjI4KxJDPwXhHx2LYlhx9Lw+bPdG4g/ 7Sb/P4h4BlBXvikmNPkR5ysEGNgbDIJOsaeJ0zFNSyAdqLWRku9RN/OG9aF3fSUfaAEd sWRF73MfZExI8nhudQdqIOrNYBWSv/y8xk2w2e/vZjFb212pOiWkIgUATnRUBYrNESJj sjSWs4IppYZXzFYmYkp4CCr7HVhEI8onO/1KNgtgLKqUOrMApbkA51LH5Gdhx0ubDOX8 vPLA== 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 i21si5920270pfk.34.2018.04.05.03.03.31; Thu, 05 Apr 2018 03:03:44 -0700 (PDT) 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 S1752018AbeDEKC3 (ORCPT + 99 others); Thu, 5 Apr 2018 06:02:29 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:60566 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751419AbeDEJuY (ORCPT ); Thu, 5 Apr 2018 05:50:24 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id F2C6D27A64E 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 v6 05/30] drm/bridge: analogix_dp: Wait for HPD signal before configuring link Date: Thu, 5 Apr 2018 11:49:35 +0200 Message-Id: <20180405095000.9756-6-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180405095000.9756-1-enric.balletbo@collabora.com> References: <20180405095000.9756-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 Reviewed-by: Archit Taneja --- 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 bf805f156272..3269deec739d 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.3