[PATCH RESEND] drm/mediatek: dsi: Fix handling of long packet reads

CK Hu (胡俊光) ck.hu at mediatek.com
Tue Nov 10 18:59:51 PST 2026


On Thu, 2026-11-05 at 14:35 +0000, Ben Grisdale via B4 Relay wrote:
> From: Ben Grisdale <bengris32 at protonmail.ch>
> 
> mtk_dsi_host_transfer() decides where the payload starts in the
> received data based on the byte count returned by mtk_dsi_recv_cnt(),
> treating anything longer than 2 bytes as a long packet.
> 
> This breaks long read responses with a 1 or 2 byte payload: they are
> treated as short packets, so the word count from the packet header is
> copied into rx_buf instead of the payload.
> 
> Fix this by checking the packet's data type instead of inferring it
> from the length.

Reviewed-by: CK Hu <ck.hu at mediatek.com>

> 
> Fixes: 21898816831f ("drm/mediatek: add dsi transfer function")
> Cc: stable at vger.kernel.org
> Signed-off-by: Ben Grisdale <bengris32 at protonmail.ch>
> ---



More information about the Linux-mediatek mailing list