media: rk-isp10: fix one vb is in queue.done_list twice

vb with done state is can't added to stream.buf_queue
when another stream is started, because this vb is
in queue.done_list.

Change-Id: I7b60d6941953509e5962efae723d36b516b4185c
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
This commit is contained in:
Hu Kejun
2018-08-29 11:43:28 +08:00
committed by Tao Huang
parent a0028c7825
commit dc72529740

View File

@@ -1306,12 +1306,14 @@ static void cif_isp10_v4l2_requeue_bufs(
dev = to_cif_isp10_device(q);
list_for_each_entry(buf, &q->queued_list, queued_entry) {
if (buf->state == VB2_BUF_STATE_DONE)
continue;
ispbuf = to_cif_isp10_vb(to_vb2_v4l2_buffer(buf));
if (!IS_ERR_VALUE(cif_isp10_qbuf(
to_cif_isp10_device(q), stream_id, ispbuf))) {
spin_lock(&dev->vbreq_lock);
if ((buf->state == VB2_BUF_STATE_QUEUED) ||
(buf->state == VB2_BUF_STATE_DONE)) {
if (buf->state == VB2_BUF_STATE_QUEUED) {
buf->state = VB2_BUF_STATE_ACTIVE;
atomic_inc(&q->owned_by_drv_count);
} else if (buf->state == VB2_BUF_STATE_ACTIVE) {