aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp/ispvideo.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-03-09 20:36:15 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 11:38:53 -0300
commitfbac1400bd1a7a88191dd71442ef2c282ad1816c (patch)
treeef2aa81db8f8e11c1e374f6d5eea5d1c74fe3db6 /drivers/media/platform/omap3isp/ispvideo.h
parent[media] v4l: vb2: Add a function to discard all DONE buffers (diff)
downloadlinux-dev-fbac1400bd1a7a88191dd71442ef2c282ad1816c.tar.xz
linux-dev-fbac1400bd1a7a88191dd71442ef2c282ad1816c.zip
[media] omap3isp: Move to videobuf2
Replace the custom buffers queue implementation with a videobuf2 queue. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/omap3isp/ispvideo.h')
-rw-r--r--drivers/media/platform/omap3isp/ispvideo.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/media/platform/omap3isp/ispvideo.h b/drivers/media/platform/omap3isp/ispvideo.h
index 1e3d17a70df2..1015505963a4 100644
--- a/drivers/media/platform/omap3isp/ispvideo.h
+++ b/drivers/media/platform/omap3isp/ispvideo.h
@@ -30,8 +30,7 @@
#include <media/media-entity.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-fh.h>
-
-#include "ispqueue.h"
+#include <media/videobuf2-core.h>
#define ISP_VIDEO_DRIVER_NAME "ispvideo"
#define ISP_VIDEO_DRIVER_VERSION "0.0.2"
@@ -124,19 +123,19 @@ static inline int isp_pipeline_ready(struct isp_pipeline *pipe)
ISP_PIPELINE_IDLE_OUTPUT);
}
-/*
- * struct isp_buffer - ISP buffer
- * @buffer: ISP video buffer
+/**
+ * struct isp_buffer - ISP video buffer
+ * @vb: videobuf2 buffer
* @irqlist: List head for insertion into IRQ queue
- * @isp_addr: MMU mapped address (a.k.a. device address) of the buffer.
+ * @isp_addr: DMA address
*/
struct isp_buffer {
- struct isp_video_buffer buffer;
+ struct vb2_buffer vb;
struct list_head irqlist;
dma_addr_t isp_addr;
};
-#define to_isp_buffer(buf) container_of(buf, struct isp_buffer, buffer)
+#define to_isp_buffer(buf) container_of(buf, struct isp_buffer, vb)
enum isp_video_dmaqueue_flags {
/* Set if DMA queue becomes empty when ISP_PIPELINE_STREAM_CONTINUOUS */
@@ -174,16 +173,14 @@ struct isp_video {
unsigned int bpl_value; /* bytes per line value */
unsigned int bpl_padding; /* padding at end of line */
- /* Entity video node streaming */
- unsigned int streaming:1;
-
/* Pipeline state */
struct isp_pipeline pipe;
struct mutex stream_lock; /* pipeline and stream states */
bool error;
/* Video buffers queue */
- struct isp_video_queue *queue;
+ void *alloc_ctx;
+ struct vb2_queue *queue;
struct mutex queue_lock; /* protects the queue */
spinlock_t irqlock; /* protects dmaqueue */
struct list_head dmaqueue;
@@ -197,7 +194,7 @@ struct isp_video {
struct isp_video_fh {
struct v4l2_fh vfh;
struct isp_video *video;
- struct isp_video_queue queue;
+ struct vb2_queue queue;
struct v4l2_format format;
struct v4l2_fract timeperframe;
};