Received: by 10.223.185.111 with SMTP id b44csp823375wrg; Fri, 9 Mar 2018 14:34:15 -0800 (PST) X-Google-Smtp-Source: AG47ELsMdnDeucFtxDvG0SXTJv256/sl+xCKi6SBb6RuUS7UtbDVHBZByaFPBWi25MnMDYYrAEJJ X-Received: by 10.98.205.140 with SMTP id o134mr97040pfg.34.1520634855515; Fri, 09 Mar 2018 14:34:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520634855; cv=none; d=google.com; s=arc-20160816; b=AzXlbAY9lQqTbdFerPzOqedArZGk020K0V90cq/6EW7q1lFWQeN2g6zCVFWVoxDLcX 4Sma8r0Vmgmtg6DsmfG/LXU0IMxOxjcP8Wmi8cbfgtH40U/+AvIi4LyV4PkmsL52QWLD dWngcJ9rBQ2TcpQcWNjQvjg4BcJr7o40D97zi2MclxxEsdlxRByEPZDOvVI+LEdpq1Ny BOpuBwhg8edDYSeNtsQUyZSJ/GcBi2FllNKtwkoDHeSfXLAeScsrnisH5pV+wy+y0p9e ctgA3ANTGhL0Kh7gjSeiF2JsA7pdGK3Dl0KzNYIkKA41eKCZJtj1CTtdTYVacWDnzQsa wHdg== 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=PwYSTDjGsb5DdPrtJL7f4cQyose8P5WFVKiPqViLmK8=; b=lyuX1TWJhk7OX/UEbB43YgPseAgS89nO6lcdPbry6AmUCOuENaG7nu61G1zHxhP4ye 5Vfk36MaYuL9466Odo4R1FoIsjW6nu2OlqN6pEHYBNlYgvthuf7bGC+YBwVfDHKKvHzK uvTNvwePEptGJ4oh1e5+wrGOXkjChb+Gg3/47FiEW+/SCR0J1C/scaqZw1d/x+NwJ1Fk 8o91DQVXT6/kSIOoTfsPgoDZPSAotKkGSjCbj3O54e4n0KxvruXdIOkvY5prn6j9sjGs 7G4On+7tXBiod56NWVVVJ8xnbDP8qGBEBSbSid0UdUg14sm+b6bctMMZ6+IMpALwikCj jgxA== 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 3-v6si1558427plv.604.2018.03.09.14.34.00; Fri, 09 Mar 2018 14:34:15 -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 S932892AbeCIWYH (ORCPT + 99 others); Fri, 9 Mar 2018 17:24:07 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42384 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932859AbeCIWYE (ORCPT ); Fri, 9 Mar 2018 17:24:04 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id A39D42792D3 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 07/36] drm/bridge: analogix_dp: Move enable video into config_video() Date: Fri, 9 Mar 2018 23:22:58 +0100 Message-Id: <20180309222327.18689-8-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: 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 Signed-off-by: Enric Balletbo i Serra Tested-by: Marek Szyprowski --- 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 5a2e35dc41e3..f9661b410cb9 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -819,11 +819,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 */ @@ -838,6 +837,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 (;;) { @@ -948,9 +950,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.16.1