From: Johannes Schneider <johannes.schneider@leica-geosystems.com>
To: barebox@lists.infradead.org, a.fatoum@pengutronix.de,
mgr@kernel.org, l.stach@pengutronix.de
Cc: thomas.haemmerle@leica-geosystems.com
Subject: [PATCH v2 06/11] video: lcdif: use 128B AXI bursts to avoid right-edge gap
Date: Thu, 4 Jun 2026 06:50:01 +0000 [thread overview]
Message-ID: <20260604065006.2933142-7-johannes.schneider@leica-geosystems.com> (raw)
In-Reply-To: <20260604065006.2933142-1-johannes.schneider@leica-geosystems.com>
From: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
P_SIZE/T_SIZE are undocumented AXI-burst-size selectors: 1 = 128 byte,
2 = 256 byte. The driver inherited 256B from NXP downstream, which
works for 1080p (stride 7680 B = 30 * 256 B) but breaks on narrower
32 bpp panels whose row byte count isn't a multiple of 256.
On an 800-pixel row at XRGB8888, stride = 3200 B = 12.5 * 256 B. The
trailing partial burst is dropped and the panel shows a ~32-pixel-wide
black strip at the right edge. 128B is a divisor of every common
32 bpp stride (3200, 3840, 5120, ...), so the gap disappears.
Signed-off-by: Thomas Haemmerle <thomas.haemmerle@leica-geosystems.com>
---
drivers/video/lcdif_kms.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/video/lcdif_kms.c b/drivers/video/lcdif_kms.c
index 3a31633818..a113f3e681 100644
--- a/drivers/video/lcdif_kms.c
+++ b/drivers/video/lcdif_kms.c
@@ -216,18 +216,14 @@ static void lcdif_set_mode(struct lcdif_drm_private *lcdif,
lcdif->base + LCDC_V8_CTRLDESCL0_1);
/*
- * Undocumented P_SIZE and T_SIZE register but those written in the
- * downstream kernel those registers control the AXI burst size. As of
- * now there are two known values:
- * 1 - 128Byte
- * 2 - 256Byte
- * Downstream set it to 256B burst size to improve the memory
- * efficiency so set it here too.
+ * P_SIZE/T_SIZE are undocumented AXI-burst-size selectors:
+ * 1 = 128 byte, 2 = 256 byte. Use 128B so any 32 bpp row divides
+ * into whole bursts; 256B on an 800-pixel row produces a partial
+ * trailing burst and a ~32-pixel black strip at the right edge.
+ *
+ * Stride is fixed to hdisplay * 4 (DRM_FORMAT_XRGB8888).
*/
- /* NOTE: Since this driver is currently fixed to DRM_FORMAT_XRGB8888
- * we asume a stride of vdisplay * 4
- */
- ctrl = CTRLDESCL0_3_P_SIZE(2) | CTRLDESCL0_3_T_SIZE(2) |
+ ctrl = CTRLDESCL0_3_P_SIZE(1) | CTRLDESCL0_3_T_SIZE(1) |
CTRLDESCL0_3_PITCH(m->hdisplay * 4);
writel(ctrl, lcdif->base + LCDC_V8_CTRLDESCL0_3);
}
--
2.43.0
next prev parent reply other threads:[~2026-06-04 6:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-04 6:49 [PATCH v2 00/11] video: enable boot splash on i.MX8MP with LVDS panel Johannes Schneider
2026-06-04 6:49 ` [PATCH v2 01/11] clk: imx8mp: add 700 MHz rate entry for VIDEO_PLL1 Johannes Schneider
2026-06-04 6:49 ` [PATCH v2 02/11] clk: imx8mp: add 1039.5 MHz and 519.75 MHz rate entries " Johannes Schneider
2026-06-04 6:49 ` [PATCH v2 03/11] pmdomain: imx8mp-blk-ctrl: add media blk-ctrl power domain support Johannes Schneider
2026-06-04 6:49 ` [PATCH v2 04/11] video: backlight-pwm: make power-supply and enable-gpio optional Johannes Schneider
2026-06-04 6:50 ` [PATCH v2 05/11] video: lcdif: make functional on i.MX8MP Johannes Schneider
2026-06-04 6:50 ` Johannes Schneider [this message]
2026-06-04 6:50 ` [PATCH v2 07/11] video: lcdif: default to RGB888_1X24 on VPL_GET_BUS_FORMAT failure Johannes Schneider
2026-06-04 6:50 ` [PATCH v2 08/11] video: lcdif: register simplefb fixup and enable framebuffer at probe Johannes Schneider
2026-06-04 6:50 ` [PATCH v2 09/11] video: lcdif: drain write-combine framebuffer in fb_damage Johannes Schneider
2026-06-04 6:50 ` [PATCH v2 10/11] video: simple-panel: support panel-lvds DT bindings Johannes Schneider
2026-06-04 6:50 ` [PATCH v2 11/11] video: simple-panel: lazily resolve backlight without failing Johannes Schneider
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=20260604065006.2933142-7-johannes.schneider@leica-geosystems.com \
--to=johannes.schneider@leica-geosystems.com \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=l.stach@pengutronix.de \
--cc=mgr@kernel.org \
--cc=thomas.haemmerle@leica-geosystems.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