Lines Matching refs:num_buffers
408 unsigned int num_buffers, unsigned int num_planes, in __vb2_queue_alloc() argument
416 num_buffers = min_t(unsigned int, num_buffers, in __vb2_queue_alloc()
417 VB2_MAX_FRAME - q->num_buffers); in __vb2_queue_alloc()
419 for (buffer = 0; buffer < num_buffers; ++buffer) { in __vb2_queue_alloc()
430 vb->index = q->num_buffers + buffer; in __vb2_queue_alloc()
484 for (buffer = q->num_buffers - buffers; buffer < q->num_buffers; in __vb2_free_mem()
517 for (buffer = q->num_buffers - buffers; buffer < q->num_buffers; in __vb2_queue_free()
528 for (buffer = q->num_buffers - buffers; buffer < q->num_buffers; in __vb2_queue_free()
545 if (q->num_buffers) { in __vb2_queue_free()
564 for (buffer = 0; buffer < q->num_buffers; ++buffer) { in __vb2_queue_free()
603 for (buffer = q->num_buffers - buffers; buffer < q->num_buffers; in __vb2_queue_free()
609 q->num_buffers -= buffers; in __vb2_queue_free()
610 if (!q->num_buffers) { in __vb2_queue_free()
642 for (buffer = 0; buffer < q->num_buffers; ++buffer) { in __buffers_in_use()
762 unsigned int num_buffers, allocated_buffers, num_planes = 0; in vb2_core_reqbufs() local
778 if (*count == 0 || q->num_buffers != 0 || in vb2_core_reqbufs()
796 ret = __vb2_queue_free(q, q->num_buffers); in vb2_core_reqbufs()
813 num_buffers = max_t(unsigned int, *count, q->min_buffers_needed); in vb2_core_reqbufs()
814 num_buffers = min_t(unsigned int, num_buffers, VB2_MAX_FRAME); in vb2_core_reqbufs()
829 ret = call_qop(q, queue_setup, q, &num_buffers, &num_planes, in vb2_core_reqbufs()
848 __vb2_queue_alloc(q, memory, num_buffers, num_planes, plane_sizes); in vb2_core_reqbufs()
865 if (!ret && allocated_buffers < num_buffers) { in vb2_core_reqbufs()
866 num_buffers = allocated_buffers; in vb2_core_reqbufs()
875 ret = call_qop(q, queue_setup, q, &num_buffers, in vb2_core_reqbufs()
878 if (!ret && allocated_buffers < num_buffers) in vb2_core_reqbufs()
888 q->num_buffers = allocated_buffers; in vb2_core_reqbufs()
924 unsigned int num_planes = 0, num_buffers, allocated_buffers; in vb2_core_create_bufs() local
927 bool no_previous_buffers = !q->num_buffers; in vb2_core_create_bufs()
930 if (q->num_buffers == VB2_MAX_FRAME) { in vb2_core_create_bufs()
959 num_buffers = min(*count, VB2_MAX_FRAME - q->num_buffers); in vb2_core_create_bufs()
970 ret = call_qop(q, queue_setup, q, &num_buffers, in vb2_core_create_bufs()
976 allocated_buffers = __vb2_queue_alloc(q, memory, num_buffers, in vb2_core_create_bufs()
987 if (allocated_buffers < num_buffers) { in vb2_core_create_bufs()
988 num_buffers = allocated_buffers; in vb2_core_create_bufs()
994 ret = call_qop(q, queue_setup, q, &num_buffers, in vb2_core_create_bufs()
997 if (!ret && allocated_buffers < num_buffers) in vb2_core_create_bufs()
1007 q->num_buffers += allocated_buffers; in vb2_core_create_bufs()
1634 for (i = 0; i < q->num_buffers; ++i) { in vb2_start_streaming()
2036 for (i = 0; i < q->num_buffers; ++i) in __vb2_queue_cancel()
2074 for (i = 0; i < q->num_buffers; ++i) { in __vb2_queue_cancel()
2129 if (!q->num_buffers) { in vb2_core_streamon()
2134 if (q->num_buffers < q->min_buffers_needed) { in vb2_core_streamon()
2223 for (buffer = 0; buffer < q->num_buffers; ++buffer) { in __find_plane_by_offset()
2266 if (index >= q->num_buffers) { in vb2_core_expbuf()
2477 __vb2_queue_free(q, q->num_buffers); in vb2_core_queue_release()
2506 if (q->num_buffers == 0 && !vb2_fileio_is_active(q)) { in vb2_core_poll()
2544 if (q->is_output && q->fileio && q->queued_count < q->num_buffers) in vb2_core_poll()
2653 if (q->streaming || q->num_buffers > 0) in __vb2_init_fileio()
2696 for (i = 0; i < q->num_buffers; i++) { in __vb2_init_fileio()
2712 for (i = 0; i < q->num_buffers; i++) { in __vb2_init_fileio()
2722 fileio->initial_index = q->num_buffers; in __vb2_init_fileio()
2723 fileio->cur_index = q->num_buffers; in __vb2_init_fileio()
2816 if (index >= q->num_buffers) { in __vb2_perform_fileio()
2914 if (fileio->initial_index < q->num_buffers) in __vb2_perform_fileio()
2966 prequeue = q->num_buffers; in vb2_thread()