]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: venus: vdec: fix error state assignment for zero bytesused
authorRenjiang Han <renjiang.han@oss.qualcomm.com>
Thu, 11 Dec 2025 09:50:39 +0000 (15:20 +0530)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 20 Jan 2026 12:19:32 +0000 (13:19 +0100)
commit93ecd6ee95c38cb533fa25f48d3c1c8cb69f410f
tree6fa69bcc1806aadae1ba241c5a7e85a1bbcd8f8e
parenteb4ee870747c3a77a9c3c84d84efb64bd481013a
media: venus: vdec: fix error state assignment for zero bytesused

When hfi_session_flush is issued, all queued buffers are returned to
the V4L2 driver. Some of these buffers are not processed and have
bytesused = 0. Currently, the driver marks such buffers as error even
during drain operations, which can incorrectly flag EOS buffers.

Only capture buffers with zero payload (and not EOS) should be marked
with VB2_BUF_STATE_ERROR. The check is performed inside the non-EOS
branch to ensure correct handling.

Fixes: 51df3c81ba10b ("media: venus: vdec: Mark flushed buffers with error state")
Signed-off-by: Renjiang Han <renjiang.han@oss.qualcomm.com>
Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/qcom/venus/vdec.c