Re: [PATCH 2/5] drm/msm/dsi: implement transfer_batch using multi-packet CMD DMA
From: Dmitry Baryshkov
Date: Sun Dec 06 2026 - 05:25:32 EST
On Sun, Nov 29, 2026 at 04:00:23PM +0300, Vladimir Bely wrote:
> The MSM DSI command DMA engine natively supports chaining multiple
> packets in a single DMA buffer by setting BIT(7) ("Last packet") only on
> the final packet of the transfer. Previously, each mipi_dsi_msg was
> dispatched as its own DMA transfer, meaning every command in video mode
> paid a full dsi_wait4video_eng_busy() cycle (~33 ms at 60 Hz) on DSI 6G
> controllers without hardware DMA scheduling.
>
> For panels whose brightness updates require multiple DCS commands (such
> as Samsung S6E88A0 AMOLED panels sending test-key, AOR, ELVSS, gamma,
> latch, and test-key-off = 6 commands, 80 bytes total), a single
> brightness change took ~200-230 ms (~4.5 updates/sec).
>
> Implement struct mipi_dsi_host_ops.transfer_batch() by packing
> contiguous write-only messages that share the same LPM flag into a
> single CMD DMA buffer (splitting cleanly if a chunk exceeds the BLLP or
> TX buffer limit, and falling back to single-message transfer for reads
> or empty messages). Tested on Samsung Galaxy A3 (SM-A300F, MSM8916,
> DSI 6G v1.3): backlight updates drop from ~200 ms to ~35 ms (~6x faster)
> with all 6 commands sent atomically in a single VBLANK.
>
> Signed-off-by: Vladimir Bely <vlwwwwww@xxxxxxxxx>
> ---
> drivers/gpu/drm/msm/dsi/dsi.h | 4 +
> drivers/gpu/drm/msm/dsi/dsi_host.c | 187 +++++++++++++++++++++++---
> drivers/gpu/drm/msm/dsi/dsi_manager.c | 40 ++++++
> 3 files changed, 214 insertions(+), 17 deletions(-)
>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
--
With best wishes
Dmitry