mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
media: iris: Update vbuf flags before v4l2_m2m_buf_done
Update the vbuf flags appropriately in error cases before calling
v4l2_m2m_buf_done(). Previously, the flag update was skippied in error
scenario, which could result in incorrect state reporting for buffers.
Fixes: 17f2a485ca ("media: iris: implement vb2 ops for buf_queue and firmware response")
Cc: stable@vger.kernel.org
Reviewed-by: Vikash Garodia <quic_vgarodia@quicinc.com>
Tested-by: Vikash Garodia <quic_vgarodia@quicinc.com> # X1E80100
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # x1e80100-crd
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
9cae3619e4
commit
8a432174ac
|
|
@ -651,6 +651,8 @@ int iris_vb2_buffer_done(struct iris_inst *inst, struct iris_buffer *buf)
|
|||
|
||||
vb2 = &vbuf->vb2_buf;
|
||||
|
||||
vbuf->flags |= buf->flags;
|
||||
|
||||
if (buf->flags & V4L2_BUF_FLAG_ERROR) {
|
||||
state = VB2_BUF_STATE_ERROR;
|
||||
vb2_set_plane_payload(vb2, 0, 0);
|
||||
|
|
@ -659,8 +661,6 @@ int iris_vb2_buffer_done(struct iris_inst *inst, struct iris_buffer *buf)
|
|||
return 0;
|
||||
}
|
||||
|
||||
vbuf->flags |= buf->flags;
|
||||
|
||||
if (V4L2_TYPE_IS_CAPTURE(type)) {
|
||||
vb2_set_plane_payload(vb2, 0, buf->data_size);
|
||||
vbuf->sequence = inst->sequence_cap++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user