]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: iris: remove v4l2_m2m_ioctl_{de,en}coder_cmd API usage during STOP handling
authorDikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Sun, 2 Nov 2025 03:40:19 +0000 (09:10 +0530)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 20 Jan 2026 13:00:12 +0000 (14:00 +0100)
commit8fc707d13df517222db12b465af4aa9df05c99e1
treef6e4f029319a39f430092289342cad6c2a11baf8
parent4980721cb97d6c47700ab61a048ac8819cfeec87
media: iris: remove v4l2_m2m_ioctl_{de,en}coder_cmd API usage during STOP handling

Currently v4l2_m2m_ioctl_{de,enc}coder_cmd is being invoked during STOP
command handling. However, this is not required as the iris driver has
its own drain and stop handling mechanism in place.

Using the m2m command API in this context leads to incorrect behavior,
where the LAST flag is prematurely attached to a capture buffer,
when there are no buffers in m2m source queue. But, in this scenario
even though the source buffers are returned to client, hardware might
still need to process the pending capture buffers.

Attaching LAST flag prematurely can result in the capture buffer being
removed from the destination queue before the hardware has finished
processing it, causing issues when the buffer is eventually returned by
the hardware.

To prevent this, remove the m2m API usage in stop handling.

Fixes: d09100763bed ("media: iris: add support for drain sequence")
Fixes: 75db90ae067d ("media: iris: Add support for drain sequence in encoder video device")
Signed-off-by: Dikshita Agarwal <dikshita.agarwal@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/iris/iris_vidc.c