Skip to content

Commit

Permalink
[media] media: videobuf2: last_buffer_queued is set at fill_v4l2_buff…
Browse files Browse the repository at this point in the history
…er()

The location in which last_buffer_queued is set is moved to fill_v4l2_buffer().
So, __vb2_perform_fileio() can use vb2_core_dqbuf() instead of
vb2_internal_dqbuf().

Signed-off-by: Junghak Sung <jh1009.sung@samsung.com>
Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com>
Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
  • Loading branch information
Junghak Sung authored and Mauro Carvalho Chehab committed Dec 18, 2015
1 parent 49d8ab9 commit dcbc216
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/media/v4l2-core/videobuf2-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ static int __fill_v4l2_buffer(struct vb2_buffer *vb, void *pb)
if (vb2_buffer_in_use(q, vb))
b->flags |= V4L2_BUF_FLAG_MAPPED;

if (!q->is_output &&
b->flags & V4L2_BUF_FLAG_DONE &&
b->flags & V4L2_BUF_FLAG_LAST)
q->last_buffer_dequeued = true;

return 0;
}

Expand Down Expand Up @@ -617,10 +622,6 @@ static int vb2_internal_dqbuf(struct vb2_queue *q, struct v4l2_buffer *b,

ret = vb2_core_dqbuf(q, b, nonblocking);

if (!ret && !q->is_output &&
b->flags & V4L2_BUF_FLAG_LAST)
q->last_buffer_dequeued = true;

return ret;
}

Expand Down

0 comments on commit dcbc216

Please sign in to comment.