|
@@ -1084,7 +1084,7 @@ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state)
|
|
spin_lock_irqsave(&q->done_lock, flags);
|
|
spin_lock_irqsave(&q->done_lock, flags);
|
|
vb->state = state;
|
|
vb->state = state;
|
|
list_add_tail(&vb->done_entry, &q->done_list);
|
|
list_add_tail(&vb->done_entry, &q->done_list);
|
|
- atomic_dec(&q->queued_count);
|
|
|
|
|
|
+ atomic_dec(&q->owned_by_drv_count);
|
|
spin_unlock_irqrestore(&q->done_lock, flags);
|
|
spin_unlock_irqrestore(&q->done_lock, flags);
|
|
|
|
|
|
/* Inform any processes that may be waiting for buffers */
|
|
/* Inform any processes that may be waiting for buffers */
|
|
@@ -1437,7 +1437,7 @@ static void __enqueue_in_driver(struct vb2_buffer *vb)
|
|
unsigned int plane;
|
|
unsigned int plane;
|
|
|
|
|
|
vb->state = VB2_BUF_STATE_ACTIVE;
|
|
vb->state = VB2_BUF_STATE_ACTIVE;
|
|
- atomic_inc(&q->queued_count);
|
|
|
|
|
|
+ atomic_inc(&q->owned_by_drv_count);
|
|
|
|
|
|
/* sync buffers */
|
|
/* sync buffers */
|
|
for (plane = 0; plane < vb->num_planes; ++plane)
|
|
for (plane = 0; plane < vb->num_planes; ++plane)
|
|
@@ -1593,7 +1593,7 @@ static int vb2_start_streaming(struct vb2_queue *q)
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
/* Tell the driver to start streaming */
|
|
/* Tell the driver to start streaming */
|
|
- ret = call_qop(q, start_streaming, q, atomic_read(&q->queued_count));
|
|
|
|
|
|
+ ret = call_qop(q, start_streaming, q, atomic_read(&q->owned_by_drv_count));
|
|
if (ret)
|
|
if (ret)
|
|
fail_qop(q, start_streaming);
|
|
fail_qop(q, start_streaming);
|
|
|
|
|
|
@@ -1826,7 +1826,7 @@ int vb2_wait_for_all_buffers(struct vb2_queue *q)
|
|
}
|
|
}
|
|
|
|
|
|
if (!q->retry_start_streaming)
|
|
if (!q->retry_start_streaming)
|
|
- wait_event(q->done_wq, !atomic_read(&q->queued_count));
|
|
|
|
|
|
+ wait_event(q->done_wq, !atomic_read(&q->owned_by_drv_count));
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffers);
|
|
EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffers);
|
|
@@ -1958,7 +1958,7 @@ static void __vb2_queue_cancel(struct vb2_queue *q)
|
|
* has not already dequeued before initiating cancel.
|
|
* has not already dequeued before initiating cancel.
|
|
*/
|
|
*/
|
|
INIT_LIST_HEAD(&q->done_list);
|
|
INIT_LIST_HEAD(&q->done_list);
|
|
- atomic_set(&q->queued_count, 0);
|
|
|
|
|
|
+ atomic_set(&q->owned_by_drv_count, 0);
|
|
wake_up_all(&q->done_wq);
|
|
wake_up_all(&q->done_wq);
|
|
|
|
|
|
/*
|
|
/*
|