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

From: Chun-Kuang Hu

Date: Mon Nov 23 2026 - 10:55:48 EST


Ben Grisdale via B4 Relay <devnull+bengris32.protonmail.ch@xxxxxxxxxx>
於 2026年11月5日週四 下午2:35寫道:
>
> 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.

Applied to mediatek-drm-fixes [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-fixes

Regards,
Chun-Kuang.

>
> Fixes: 21898816831f ("drm/mediatek: add dsi transfer function")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Ben Grisdale <bengris32@xxxxxxxxxxxxx>
> ---