[PATCH v2 0/2] media: mediatek: vcodec: Fix NULL source address handling in decoders

From: Fei Shao

Date: Fri Oct 23 2026 - 04:01:22 EST


Both the stateful and the stateless decoder workers peek the source
buffer and, if vb2_plane_vaddr() returns NULL, finish the m2m job without
returning the buffer. The buffer stays at the head of the ready list, so
the same job is scheduled again and fails the same way. In the stateless
decoder the media request is also never completed.

The two fixes are split because they fix different commits, and the
stateless fix also has to complete the media request.

Changes in v2:
- Call media_request_manual_complete() instead of
mtk_vdec_stateless_cap_to_disp() to avoid dequeuing a capture buffer
that may be in use by the core workqueue on MediaTek LAT platforms.

Fei Shao (2):
media: mediatek: vcodec: Return source buffer on NULL va in stateful
decoder
media: mediatek: vcodec: Complete request on NULL va in stateless
decoder

.../vcodec/decoder/mtk_vcodec_dec_stateful.c | 4 +++-
.../vcodec/decoder/mtk_vcodec_dec_stateless.c | 22 ++++++++++++-------
2 files changed, 17 insertions(+), 9 deletions(-)

--
2.56.0.257.gf7497c7d27-goog