Received: by 10.213.65.68 with SMTP id h4csp1743113imn; Thu, 5 Apr 2018 03:04:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx48DYABlmG04tN9wXSOZUtx0i7m1ctr/m61Q87H4gpeDGWL/5m91G32GHWYUrDdrnunr3pIz X-Received: by 2002:a17:902:44c:: with SMTP id 70-v6mr22544422ple.354.1522922649854; Thu, 05 Apr 2018 03:04:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522922649; cv=none; d=google.com; s=arc-20160816; b=zrotT7RI2T69HUTxFsG53Mf+qu5rYqE9BavRjGpvLHIAPBe1U3JU777UMZ/8Rvw+mQ mSOmtdL9ZKy0du3DY8Y3FWoDvtOysIuaL3XLx1pUCp0aiUSalF1/wE46f/a3cz8yMbiC aeTJncbYrwwBxbkU2Ax1r5UsIU395Rry2NrHNsiSHDbxiZPyliZ4iohPqSVXWyBvpHOm 9LvzTn9bI+xqy5znNG2kcTlp6ftax7MTEBP4UNvyKhcadEBX5EmgbWYIh7oh/1M69DHk 6gdXiGxBhUvJnboyx6l2fD/qex69/n0oQkMSfKFipeJ1ko961RUB38sTQB5rpkNA43su GkpQ== 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=NC/WFWNUDFeuOexJ8nSaoDRwwiIVDGvTgMUZainszLk=; b=dhvlMeLeX2IDS/2Z71lSnZlPUZayeDK/XC/Km9AjGdTK6vHmmnGls7Oqdle5gqRfVC oiFZ3Q0FALJqjqLP1msnIhXankI9/OTUnWoKkex11qrl/bTJaH7bpHncUNA/taE/T2g/ G3ipOZplTqrgAkae1kq7HFIyizCpjYexPxNyzYZE1Y62JdeG/Xa0b+7/J5cjyt4uiK++ 93ut1WuLEfEreLdXR2SgBpxEEniLuIHgj/brN6Hzj/oDcRzK0htVnXWAS5FJ/83MRnUT jNzInWdgpg3K5GTGjsROed1zIqMWhkCNbSHYr3XF9PacgvJrztNuApdGllYdvFV7GPjw Fa1Q== 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 f35-v6si7559985plh.569.2018.04.05.03.03.55; Thu, 05 Apr 2018 03:04:09 -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 S1751645AbeDEKC7 (ORCPT + 99 others); Thu, 5 Apr 2018 06:02:59 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:60474 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751225AbeDEJuP (ORCPT ); Thu, 5 Apr 2018 05:50:15 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id C9BC22779F0 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 01/30] drm/bridge: analogix_dp: Move enable video into config_video() Date: Thu, 5 Apr 2018 11:49:31 +0200 Message-Id: <20180405095000.9756-2-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: Lin Huang We need to enable video before analogix_dp_is_video_stream_on(), so we can get the right video stream status. We needed to increase the delay in the timeout loop because there is random "Timeout of video streamclk ok" message happen when debug edp panel, this time do not define in the spec. 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 5c52307146c7..05a0ca4af057 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.3