Re: [PATCH RESEND] drm/mediatek: dsi: Fix handling of long packet reads
From: CK Hu (胡俊光)
Date: Tue Nov 10 2026 - 22:04:15 EST
On Thu, 2026-11-05 at 14:35 +0000, Ben Grisdale via B4 Relay wrote:
> From: Ben Grisdale <bengris32@xxxxxxxxxxxxx>
>
> 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@xxxxxxxxxxxx>
>
> Fixes: 21898816831f ("drm/mediatek: add dsi transfer function")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Ben Grisdale <bengris32@xxxxxxxxxxxxx>
> ---