@@ -865,7 +865,7 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory,
865865 /*
866866 * Make sure the requested values and current defaults are sane.
867867 */
868- num_buffers = max_t (unsigned int , * count , q -> min_buffers_needed );
868+ num_buffers = max_t (unsigned int , * count , q -> min_queued_buffers );
869869 num_buffers = min_t (unsigned int , num_buffers , q -> max_num_buffers );
870870 memset (q -> alloc_devs , 0 , sizeof (q -> alloc_devs ));
871871 /*
@@ -917,7 +917,7 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory,
917917 * There is no point in continuing if we can't allocate the minimum
918918 * number of buffers needed by this vb2_queue.
919919 */
920- if (allocated_buffers < q -> min_buffers_needed )
920+ if (allocated_buffers < q -> min_queued_buffers )
921921 ret = - ENOMEM ;
922922
923923 /*
@@ -1653,7 +1653,7 @@ EXPORT_SYMBOL_GPL(vb2_core_prepare_buf);
16531653 * @q: videobuf2 queue
16541654 *
16551655 * Attempt to start streaming. When this function is called there must be
1656- * at least q->min_buffers_needed buffers queued up (i.e. the minimum
1656+ * at least q->min_queued_buffers queued up (i.e. the minimum
16571657 * number of buffers required for the DMA engine to function). If the
16581658 * @start_streaming op fails it is supposed to return all the driver-owned
16591659 * buffers back to vb2 in state QUEUED. Check if that happened and if
@@ -1846,7 +1846,7 @@ int vb2_core_qbuf(struct vb2_queue *q, struct vb2_buffer *vb, void *pb,
18461846 * then we can finally call start_streaming().
18471847 */
18481848 if (q -> streaming && !q -> start_streaming_called &&
1849- q -> queued_count >= q -> min_buffers_needed ) {
1849+ q -> queued_count >= q -> min_queued_buffers ) {
18501850 ret = vb2_start_streaming (q );
18511851 if (ret ) {
18521852 /*
@@ -2210,9 +2210,9 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
22102210 return - EINVAL ;
22112211 }
22122212
2213- if (q_num_bufs < q -> min_buffers_needed ) {
2214- dprintk (q , 1 , "need at least %u allocated buffers\n" ,
2215- q -> min_buffers_needed );
2213+ if (q_num_bufs < q -> min_queued_buffers ) {
2214+ dprintk (q , 1 , "need at least %u queued buffers\n" ,
2215+ q -> min_queued_buffers );
22162216 return - EINVAL ;
22172217 }
22182218
@@ -2224,7 +2224,7 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
22242224 * Tell driver to start streaming provided sufficient buffers
22252225 * are available.
22262226 */
2227- if (q -> queued_count >= q -> min_buffers_needed ) {
2227+ if (q -> queued_count >= q -> min_queued_buffers ) {
22282228 ret = vb2_start_streaming (q );
22292229 if (ret )
22302230 goto unprepare ;
@@ -2504,21 +2504,21 @@ int vb2_core_queue_init(struct vb2_queue *q)
25042504 return - EINVAL ;
25052505
25062506 if (WARN_ON (q -> max_num_buffers > MAX_BUFFER_INDEX ) ||
2507- WARN_ON (q -> min_buffers_needed > q -> max_num_buffers ))
2507+ WARN_ON (q -> min_queued_buffers > q -> max_num_buffers ))
25082508 return - EINVAL ;
25092509
25102510 if (WARN_ON (q -> requires_requests && !q -> supports_requests ))
25112511 return - EINVAL ;
25122512
25132513 /*
25142514 * This combination is not allowed since a non-zero value of
2515- * q->min_buffers_needed can cause vb2_core_qbuf() to fail if
2515+ * q->min_queued_buffers can cause vb2_core_qbuf() to fail if
25162516 * it has to call start_streaming(), and the Request API expects
25172517 * that queueing a request (and thus queueing a buffer contained
25182518 * in that request) will always succeed. There is no method of
25192519 * propagating an error back to userspace.
25202520 */
2521- if (WARN_ON (q -> supports_requests && q -> min_buffers_needed ))
2521+ if (WARN_ON (q -> supports_requests && q -> min_queued_buffers ))
25222522 return - EINVAL ;
25232523
25242524 INIT_LIST_HEAD (& q -> queued_list );
@@ -2735,14 +2735,14 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
27352735 return - EBUSY ;
27362736
27372737 /*
2738- * Start with q->min_buffers_needed + 1, driver can increase it in
2738+ * Start with q->min_queued_buffers + 1, driver can increase it in
27392739 * queue_setup()
27402740 *
2741- * 'min_buffers_needed ' buffers need to be queued up before you
2741+ * 'min_queued_buffers ' buffers need to be queued up before you
27422742 * can start streaming, plus 1 for userspace (or in this case,
27432743 * kernelspace) processing.
27442744 */
2745- count = max (2 , q -> min_buffers_needed + 1 );
2745+ count = max (2 , q -> min_queued_buffers + 1 );
27462746
27472747 dprintk (q , 3 , "setting up file io: mode %s, count %d, read_once %d, write_immediately %d\n" ,
27482748 (read ) ? "read" : "write" , count , q -> fileio_read_once ,
0 commit comments