Commit ae2caf39 authored by Ming Qian's avatar Ming Qian Committed by Mauro Carvalho Chehab

media: amphion: apply vb2_queue_error instead of setting manually

vb2_queue_error is help to set the error of vb2_queue,
don't need to set it manually

Fixes: 3cd08451 ("media: amphion: add vpu v4l2 m2m support")
Signed-off-by: default avatarMing Qian <ming.qian@nxp.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent e1b558cd
......@@ -65,18 +65,11 @@ unsigned int vpu_get_buffer_state(struct vb2_v4l2_buffer *vbuf)
void vpu_v4l2_set_error(struct vpu_inst *inst)
{
struct vb2_queue *src_q;
struct vb2_queue *dst_q;
vpu_inst_lock(inst);
dev_err(inst->dev, "some error occurs in codec\n");
if (inst->fh.m2m_ctx) {
src_q = v4l2_m2m_get_src_vq(inst->fh.m2m_ctx);
dst_q = v4l2_m2m_get_dst_vq(inst->fh.m2m_ctx);
src_q->error = 1;
dst_q->error = 1;
wake_up(&src_q->done_wq);
wake_up(&dst_q->done_wq);
vb2_queue_error(v4l2_m2m_get_src_vq(inst->fh.m2m_ctx));
vb2_queue_error(v4l2_m2m_get_dst_vq(inst->fh.m2m_ctx));
}
vpu_inst_unlock(inst);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment