media: uvcvideo: queue: Support asynchronous buffer handling
authorKieran Bingham <kieran.bingham@ideasonboard.com>
Thu, 16 Mar 2017 13:33:05 +0000 (09:33 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 5 Dec 2018 08:12:09 +0000 (03:12 -0500)
commit01e90464e42e51b118a95ebb0fb002af1e2e79af
treec00d06140b85cb18df9306ce1fba265a3f106ff3
parentc50c9c1e659d8de9c13441f243e7938413be6e71
media: uvcvideo: queue: Support asynchronous buffer handling

The buffer queue interface currently operates sequentially, processing
buffers after they have fully completed.

In preparation for supporting parallel tasks operating on the buffers,
we will need to support buffers being processed on multiple CPUs.

Adapt the uvc_queue_next_buffer() such that a reference count tracks the
active use of the buffer, returning the buffer to the VB2 stack at
completion.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/uvc/uvc_queue.c
drivers/media/usb/uvc/uvcvideo.h