[media] v4l: vb2: Add a function to discard all DONE buffers
[sfrench/cifs-2.6.git] / drivers / media / platform / omap3isp / ispqueue.h
index e03af74ded2821016543dfb7f5e596080b34a6be..ff182086fb40563bc5f4771bbd04fb29bb0e6c53 100644 (file)
@@ -68,13 +68,11 @@ enum isp_video_buffer_state {
  * @prepared: Whether the buffer has been prepared
  * @skip_cache: Whether to skip cache management operations for this buffer
  * @vaddr: Memory virtual address (for kernel buffers)
- * @paddr: Memory physicall address (for kernel buffers)
  * @vm_flags: Buffer VMA flags (for userspace buffers)
  * @npages: Number of pages (for userspace buffers)
+ * @sgt: Scatter gather table (for userspace buffers)
  * @pages: Pages table (for userspace non-VM_PFNMAP buffers)
- * @sgt: Scatter gather table (for non-VM_PFNMAP buffers)
  * @vbuf: V4L2 buffer
- * @irqlist: List head for insertion into IRQ queue
  * @state: Current buffer state
  * @wait: Wait queue to signal buffer completion
  */
@@ -87,19 +85,17 @@ struct isp_video_buffer {
 
        /* For kernel buffers. */
        void *vaddr;
-       dma_addr_t paddr;
 
        /* For userspace buffers. */
        vm_flags_t vm_flags;
        unsigned int npages;
-       struct page **pages;
-
-       /* For all buffers except VM_PFNMAP. */
        struct sg_table sgt;
 
+       /* For non-VM_PFNMAP userspace buffers. */
+       struct page **pages;
+
        /* Touched by the interrupt handler. */
        struct v4l2_buffer vbuf;
-       struct list_head irqlist;
        enum isp_video_buffer_state state;
        wait_queue_head_t wait;
        dma_addr_t dma;
@@ -116,8 +112,7 @@ struct isp_video_buffer {
  *     the userspace memory address for a USERPTR buffer, with the queue lock
  *     held. Drivers should perform device-specific buffer preparation (such as
  *     mapping the buffer memory in an IOMMU). This operation is optional.
- * @buffer_queue: Called when a buffer is being added to the queue with the
- *     queue irqlock spinlock held.
+ * @buffer_queue: Called when a buffer is being added.
  */
 struct isp_video_queue_operations {
        void (*queue_prepare)(struct isp_video_queue *queue,
@@ -134,8 +129,6 @@ struct isp_video_queue_operations {
  * @bufsize: Size of a driver-specific buffer object
  * @count: Number of currently allocated buffers
  * @buffers: ISP video buffers
- * @lock: Mutex to protect access to the buffers, main queue and state
- * @irqlock: Spinlock to protect access to the IRQ queue
  * @streaming: Queue state, indicates whether the queue is streaming
  * @queue: List of all queued buffers
  */
@@ -147,8 +140,6 @@ struct isp_video_queue {
 
        unsigned int count;
        struct isp_video_buffer *buffers[ISP_VIDEO_MAX_BUFFERS];
-       struct mutex lock;
-       spinlock_t irqlock;
 
        unsigned int streaming:1;