X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=drivers%2Fmedia%2Fplatform%2Fomap3isp%2Fispqueue.h;h=ecff055d7a5bc54357bf4fbf5c22b6a95818ba61;hp=908dfd712e8e3fa809637962f141b76dd0768571;hb=988d54c4b9463bd14bb05e4b8c9a47d04a14d272;hpb=cf9ce948f47640797bd19980e1d99c6d17d0bdc3 diff --git a/drivers/media/platform/omap3isp/ispqueue.h b/drivers/media/platform/omap3isp/ispqueue.h index 908dfd712e8e..ecff055d7a5b 100644 --- a/drivers/media/platform/omap3isp/ispqueue.h +++ b/drivers/media/platform/omap3isp/ispqueue.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -68,12 +69,9 @@ enum isp_video_buffer_state { * @skip_cache: Whether to skip cache management operations for this buffer * @vaddr: Memory virtual address (for kernel buffers) * @vm_flags: Buffer VMA flags (for userspace buffers) - * @offset: Offset inside the first page (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) - * @paddr: Memory physical address (for userspace VM_PFNMAP buffers) - * @sglen: Number of elements in the scatter list (for non-VM_PFNMAP buffers) - * @sglist: Scatter list (for non-VM_PFNMAP buffers) * @vbuf: V4L2 buffer * @irqlist: List head for insertion into IRQ queue * @state: Current buffer state @@ -91,20 +89,18 @@ struct isp_video_buffer { /* For userspace buffers. */ vm_flags_t vm_flags; - unsigned long offset; unsigned int npages; - struct page **pages; - dma_addr_t paddr; + struct sg_table sgt; - /* For all buffers except VM_PFNMAP. */ - unsigned int sglen; - struct scatterlist *sglist; + /* 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; }; #define to_isp_video_buffer(vb) container_of(vb, struct isp_video_buffer, vb) @@ -120,17 +116,12 @@ struct isp_video_buffer { * 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_cleanup: Called before freeing buffers, or before changing the - * userspace memory address for a USERPTR buffer, with the queue lock held. - * Drivers must perform cleanup operations required to undo the - * buffer_prepare call. This operation is optional. */ struct isp_video_queue_operations { void (*queue_prepare)(struct isp_video_queue *queue, unsigned int *nbuffers, unsigned int *size); int (*buffer_prepare)(struct isp_video_buffer *buf); void (*buffer_queue)(struct isp_video_buffer *buf); - void (*buffer_cleanup)(struct isp_video_buffer *buf); }; /** @@ -141,7 +132,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 @@ -154,7 +144,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;