From patchwork Fri Mar 10 04:32:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9614663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EC71060414 for ; Fri, 10 Mar 2017 04:38:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCA7C2864A for ; Fri, 10 Mar 2017 04:38:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D03BA286EF; Fri, 10 Mar 2017 04:38:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8A0E02864A for ; Fri, 10 Mar 2017 04:38:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cqMAJFR4NzAPmQSA8Q7cpDLhoLtkWsDFE49+YLtzqrY=; b=Zy/aqx3i1HtCcr 1bi3e/YF0+hmXcQhL3y9+jvKOWjZfg23v4nQF3IByffYgbTNBC80dh8LDfuHVpEVfn3fJ4W0KpO8r Xv9+GiX0oCq7mgxMjkXBJRwut1czoZruxJc3bZoc/wrAItN7h7iN11AMNqMW4yVYGhq46oAcdwlvU J4rU5aSsxNn8SzYLAn0V1yZsOliyMYL8Q6yHjvviALjEeCuX2QRDAfnspO2WVTqLYFS7Y5dBmDewF 1MKbC6ecVitsxgFoysx4E6a9TWHQJcXs9JJRnV7MlSGYYVWYN3z4JgJc+SL0yhqpyi4S7hk+wuRVK GBLojaPXF70lKa5k7/Og==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cmCK7-0002Gw-9c; Fri, 10 Mar 2017 04:38:39 +0000 Received: from mail-qk0-x230.google.com ([2607:f8b0:400d:c09::230]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cmCK3-0002C0-4o for linux-rockchip@lists.infradead.org; Fri, 10 Mar 2017 04:38:37 +0000 Received: by mail-qk0-x230.google.com with SMTP id 1so151569057qkl.3 for ; Thu, 09 Mar 2017 20:38:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4Q1FZw4tftDM1H/dcn/RaxdJ3fyhC2t95dvfLesUlXk=; b=fBm8ebyrfqwSbYFXl3DRvJtHz7NLgpma8icsKECLT58E0Gh9IaAIMhG+oDK/22n3cS /nkOJWom1dewikvnZUYiCBP57jyZ08PJzfdriwrxVwj5uWBHgPydI7xNPtUL4001X7rK sesRYYhftspwCi+blgEVdG+Ig2ovmIlA9r0wQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4Q1FZw4tftDM1H/dcn/RaxdJ3fyhC2t95dvfLesUlXk=; b=VxcuC/oyNJ79ulhHZ0YJ/rINpNupob21oZfZ6zQUxCnRZiJ2FX9KStSgAazdoK8SKp 72vp4rGftMBPQbQnesgLJ1ui6Cz3900y9YhtC/slbwtNw0PlAK9KV+QkJF6PadZd8NMi M4+ROaM5KAt3Bhozm+WjWbzzCNB1quRyO1uIL6vcMQcrfElIvpGamBfVaQhTEg4zZV8k 8o1cA5H8QjS7uul29NS9p8hkD1E7OpAzH6QD4Q4s+zXUudPK9zTJKn2mslO+FdckFoHU Rs7PNRbUarrifvhWXQJl6tF50QkA+Bszg/9WyDBtkslUDnb4g7yeMSqv/t2/B+NtwFD5 lOIQ== X-Gm-Message-State: AMke39nwPMvin4TEJnSVPzFWOs/bmUk3MVpRsxGQ7E/jBSL5RBYIi1U4vPWmbf1SqZ4nvdS/ X-Received: by 10.200.54.13 with SMTP id m13mr17598119qtb.214.1489120694313; Thu, 09 Mar 2017 20:38:14 -0800 (PST) Received: from boxwood.roam.corp.google.com (cpe-75-189-128-87.nc.res.rr.com. [75.189.128.87]) by smtp.gmail.com with ESMTPSA id n19sm5697731qtn.35.2017.03.09.20.38.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Mar 2017 20:38:13 -0800 (PST) From: Sean Paul To: linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH 19/41] drm/bridge: analogix_dp: Wait for HPD signal before configuring link Date: Thu, 9 Mar 2017 23:32:34 -0500 Message-Id: <20170310043305.17216-20-seanpaul@chromium.org> X-Mailer: git-send-email 2.12.0.246.ga2ecc84866-goog In-Reply-To: <20170310043305.17216-1-seanpaul@chromium.org> References: <20170310043305.17216-1-seanpaul@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170309_203835_276199_750990CD X-CRM114-Status: UNSURE ( 9.13 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Archit Taneja , zain wang , Lin Huang , Tomeu Vizoso , David Airlie , Douglas Anderson , Sean Paul , Yakir Yang , =?UTF-8?q?St=C3=A9phane=20Marchesin?= Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index f3eea7636a2e..048b6f7c9b6e 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1172,6 +1172,15 @@ 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;