From: Icenowy Zheng <icenowy@aosc.io>
To: Maxime Ripard <mripard@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: linux-sunxi@googlegroups.com, Icenowy Zheng <icenowy@aosc.io>,
linux-arm-kernel@lists.infradead.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] Revert "drm/sun4i: dsi: Rework a bit the hblk calculation"
Date: Tue, 1 Oct 2019 16:02:53 +0800 [thread overview]
Message-ID: <20191001080253.6135-4-icenowy@aosc.io> (raw)
In-Reply-To: <20191001080253.6135-1-icenowy@aosc.io>
This reverts commit 62e7511a4f4dcf07f753893d3424decd9466c98b.
This commit, although claimed as a refactor, in fact changed the
formula.
By expanding the original formula, we can find that the const 10 is not
substracted, instead it's added to the value (because 10 is negative
when calculating hsa, and hsa itself is negative when calculating hblk).
This breaks the similar pattern to other formulas, so restoring the
original formula is more proper.
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
---
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
index 2d3e822a7739..cb5fd19c0d0d 100644
--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
@@ -577,14 +577,9 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi,
(mode->hsync_start - mode->hdisplay) * Bpp - HFP_PACKET_OVERHEAD);
/*
- * The blanking is set using a sync event (4 bytes)
- * and a blanking packet (4 bytes + payload + 2
- * bytes). Its minimal size is therefore 10 bytes.
+ * hblk seems to be the line + porches length.
*/
-#define HBLK_PACKET_OVERHEAD 10
- hblk = max((unsigned int)HBLK_PACKET_OVERHEAD,
- (mode->htotal - (mode->hsync_end - mode->hsync_start)) * Bpp -
- HBLK_PACKET_OVERHEAD);
+ hblk = mode->htotal * Bpp - hsa;
/*
* And I'm not entirely sure what vblk is about. The driver in
--
2.21.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-10-01 8:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-01 8:02 [PATCH 0/3] drm/sun4i: dsi: misc timing fixes Icenowy Zheng
2019-10-01 8:02 ` [PATCH 1/3] Revert "drm/sun4i: dsi: Change the start delay calculation" Icenowy Zheng
2019-10-03 7:08 ` [linux-sunxi] " Jagan Teki
2019-10-03 13:19 ` Maxime Ripard
2019-10-03 13:21 ` Icenowy Zheng
2019-10-03 13:34 ` Maxime Ripard
2019-10-01 8:02 ` [PATCH 2/3] drm/sun4i: dsi: fix DRQ calculation Icenowy Zheng
2019-10-03 4:37 ` [linux-sunxi] " Jagan Teki
2019-10-01 8:02 ` Icenowy Zheng [this message]
2019-10-03 4:23 ` [linux-sunxi] [PATCH 3/3] Revert "drm/sun4i: dsi: Rework a bit the hblk calculation" Jagan Teki
2019-10-06 14:44 ` Icenowy Zheng
2019-10-06 15:12 ` Icenowy Zheng
2019-10-07 15:19 ` Ondřej Jirman
2019-10-02 10:36 ` [PATCH 0/3] drm/sun4i: dsi: misc timing fixes Maxime Ripard
2019-10-03 3:58 ` Icenowy Zheng
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=20191001080253.6135-4-icenowy@aosc.io \
--to=icenowy@aosc.io \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=mripard@kernel.org \
--cc=wens@csie.org \
/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