mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: allen <allen.chen@ite.com.tw>
To: unlisted-recipients:; (no To-header on input)
Cc: Allen Chen <allen.chen@ite.com.tw>,
	Pin-yen Lin <treapking@google.com>,
	Jau-Chih Tseng <Jau-Chih.Tseng@ite.com.tw>,
	Kenneth Hung <Kenneth.Hung@ite.com.tw>,
	Hermes Wu <Hermes.Wu@ite.com.tw>,
	Pin-Yen Lin <treapking@chromium.org>,
	Robert Foss <robert.foss@linaro.org>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	"open list:DRM DRIVERS" <dri-devel@lists.freedesktop.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: [PATCH v2 3/3] drm/bridge: it6505: Modified video clock calculation and video debug message
Date: Fri, 15 Jul 2022 10:49:07 +0800	[thread overview]
Message-ID: <20220715024910.12578-4-allen.chen@ite.com.tw> (raw)
In-Reply-To: <20220715024910.12578-1-allen.chen@ite.com.tw>

From: allen chen <allen.chen@ite.com.tw>

Speed up video clock calculation and remove redundant video debug message.

Signed-off-by: Pin-Yen Lin <treapking@chromium.org>
Signed-off-by: Allen Chen <allen.chen@ite.com.tw>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
---
 drivers/gpu/drm/bridge/ite-it6505.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
index cfd2c3275dc5..11a34ddb60a1 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -703,7 +703,7 @@ static void it6505_calc_video_info(struct it6505 *it6505)
 	DRM_DEV_DEBUG_DRIVER(dev, "hactive_start:%d, vactive_start:%d",
 			     hdes, vdes);
 
-	for (i = 0; i < 10; i++) {
+	for (i = 0; i < 3; i++) {
 		it6505_set_bits(it6505, REG_DATA_CTRL0, ENABLE_PCLK_COUNTER,
 				ENABLE_PCLK_COUNTER);
 		usleep_range(10000, 15000);
@@ -720,7 +720,7 @@ static void it6505_calc_video_info(struct it6505 *it6505)
 		return;
 	}
 
-	sum /= 10;
+	sum /= 3;
 	pclk = 13500 * 2048 / sum;
 	it6505->video_info.clock = pclk;
 	it6505->video_info.hdisplay = hdew;
@@ -2344,8 +2344,6 @@ static void it6505_irq_hpd(struct it6505 *it6505)
 
 		if (!it6505_get_video_status(it6505))
 			it6505_video_reset(it6505);
-
-		it6505_calc_video_info(it6505);
 	} else {
 		memset(it6505->dpcd, 0, sizeof(it6505->dpcd));
 
-- 
2.25.1


      parent reply	other threads:[~2022-07-15  2:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-15  2:49 [PATCH v2 0/3] drm/bridge: it6505: Fixes bugs allen
2022-07-15  2:49 ` [PATCH v2 1/3] drm/bridge: it6505: Modified power sequence allen
2022-07-18 11:47   ` Robert Foss
2022-07-15  2:49 ` [PATCH v2 2/3] drm/bridge: it6505: Add i2c api power on check allen
2022-07-15  2:49 ` allen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220715024910.12578-4-allen.chen@ite.com.tw \
    --to=allen.chen@ite.com.tw \
    --cc=Hermes.Wu@ite.com.tw \
    --cc=Jau-Chih.Tseng@ite.com.tw \
    --cc=Kenneth.Hung@ite.com.tw \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@linux.ie \
    --cc=andrzej.hajda@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=robert.foss@linaro.org \
    --cc=treapking@chromium.org \
    --cc=treapking@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®