Received: by 10.223.176.46 with SMTP id f43csp687844wra; Fri, 26 Jan 2018 05:24:52 -0800 (PST) X-Google-Smtp-Source: AH8x224uV4fBmh42s10IHIAehIeNR/RmAzbWsdJDuI8CGXdhAPSxYDy/MqWC1ubRXcJFpJghCGSP X-Received: by 10.98.215.70 with SMTP id v6mr19339985pfl.83.1516973092565; Fri, 26 Jan 2018 05:24:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516973092; cv=none; d=google.com; s=arc-20160816; b=qUZ99ogK/dKgGs6KspKy/iflTFqr1vhWGU39I+8VKgBdZDEG6W3Ms8dMzoyrosx8KB I62ZH/J54KOd8mMweddn5xVucBDYrNeRvkaxe6XZAx0JkwZG0VkMU4iA70V2nVjJS1rA woAbfVRf1Y7x9tqldt792wvc+kFRcTQT7aRaJhIGoV4SAHe+P6KIFAkWq2tW7PnoLNWh LKxs5u3sFU3gXTfSWPL/a9on3ZsWdVCwSe5ZOMWO2lZaZ6z+BWi45d/blvL1t7XpvZI1 jnpk4Do/2GRSj4iM9hNf+VvlJGqAx5bAbYghfTIrSSY2TMDm8XkXv3Sv9qTyIscsZAUc VgUA== 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 :content-transfert-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=sSUOr8X1axX+vd56F/UGLxAnAXik63W9/SVfK85ypFQ=; b=oxeRq6t84U5a137Aj+5qI24MwwxzFf2GFU93k4cbNeClW6Xq5icJv43l8sJFKt7Ger T+0dU1YK7o1GhIiWvJrONKoCRdnTgdhKIl036ifIDyLqxoniUPvoQjdwkfIcMUdBiuTy t7UyiAXuvI0WLAqeUB/SnGuR9jnVqaS3WbDQ/z0LuIhLZnn1tH1pWVbKROsuogNbuIvj B5GKCaNE9wmizdDsNE2r1PduDwkw+4oiBXfwS7AU6WWgfNCM1KbxD9grXoO5lPB+zxKm PP42XnwCuvMdTZbiZ3pp9DYHUGHx52+rLB+hShId4Ja5dNQTiG6ExmpOSorL7jPp0Vma r61g== 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 g12-v6si3721288plt.638.2018.01.26.05.24.38; Fri, 26 Jan 2018 05:24:52 -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 S1752292AbeAZNRw (ORCPT + 99 others); Fri, 26 Jan 2018 08:17:52 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:34516 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795AbeAZNRs (ORCPT ); Fri, 26 Jan 2018 08:17:48 -0500 Received: from localhost.localdomain (unknown [IPv6:2a01:e35:8a7e:4790:a8d7:ca4:7b4f:7f87]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tescande) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 909E72747F8; Fri, 26 Jan 2018 13:17:46 +0000 (GMT) From: Thierry Escande To: Archit Taneja , Inki Dae , Thierry Reding , Sandy Huang , Sean Paul , David Airlie , Tomasz Figa Cc: Haixia Shi , =?UTF-8?q?=C3=98rjan=20Eide?= , Zain Wang , Yakir Yang , Lin Huang , Douglas Anderson , Mark Yao , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 13/43] drm/bridge: analogix_dp: Move enable video into config_video() Date: Fri, 26 Jan 2018 14:16:40 +0100 Message-Id: <20180126131710.7622-14-thierry.escande@collabora.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180126131710.7622-1-thierry.escande@collabora.com> References: <20180126131710.7622-1-thierry.escande@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset = "utf-8" Content-Transfert-Encoding: 8bit Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lin Huang We need to enable video before analogix_dp_is_video_stream_on(), so we can get the right video stream status. Cc: 征增 王 Cc: Stéphane Marchesin Signed-off-by: Lin Huang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 49a05eac41c1..8ef9e31c6713 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -820,11 +820,10 @@ static int analogix_dp_config_video(struct analogix_dp_device *dp) if (analogix_dp_is_slave_video_stream_clock_on(dp) == 0) break; if (timeout_loop > DP_TIMEOUT_LOOP_COUNT) { - dev_err(dp->dev, "Timeout of video streamclk ok\n"); + dev_err(dp->dev, "Timeout of slave video streamclk ok\n"); return -ETIMEDOUT; } - - usleep_range(1, 2); + usleep_range(1000, 1001); } /* Set to use the register calculated M/N video */ @@ -839,6 +838,9 @@ static int analogix_dp_config_video(struct analogix_dp_device *dp) /* Configure video slave mode */ analogix_dp_enable_video_master(dp, 0); + /* Enable video */ + analogix_dp_start_video(dp); + timeout_loop = 0; for (;;) { @@ -952,9 +954,6 @@ static void analogix_dp_commit(struct analogix_dp_device *dp) DRM_ERROR("failed to enable the panel\n"); } - /* Enable video */ - analogix_dp_start_video(dp); - dp->psr_enable = analogix_dp_detect_sink_psr(dp); if (dp->psr_enable) analogix_dp_enable_sink_psr(dp); -- 2.14.1