aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/hisi/isp/isp-video.h
diff options
context:
space:
mode:
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2018-11-23 21:22:37 +0530
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2018-11-23 21:22:37 +0530
commite89b90550f3bfdf483d472e0723bcb8b57ecdd34 (patch)
tree640081094a96332d3a4b94732e881ed23e2c1a4c /drivers/media/platform/hisi/isp/isp-video.h
parentd68335c072a803e002b21519e5ca27269e8a0bfe (diff)
download96b-common-hikey_v4l2_4.15.tar.gz
media: hisi: ISP: Add video device and some cleanupshikey_v4l2_4.15
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'drivers/media/platform/hisi/isp/isp-video.h')
-rw-r--r--drivers/media/platform/hisi/isp/isp-video.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/media/platform/hisi/isp/isp-video.h b/drivers/media/platform/hisi/isp/isp-video.h
new file mode 100644
index 000000000000..1ca7015f1da3
--- /dev/null
+++ b/drivers/media/platform/hisi/isp/isp-video.h
@@ -0,0 +1,54 @@
+#ifndef ISP_VIDEO_H
+#define ISP_VIDEO_H
+
+#include <linux/mutex.h>
+#include <linux/videodev2.h>
+#include <media/media-entity.h>
+#include <media/v4l2-dev.h>
+#include <media/v4l2-device.h>
+#include <media/v4l2-fh.h>
+#include <media/v4l2-mediabus.h>
+#include <media/videobuf2-v4l2.h>
+
+struct isp_buffer {
+ struct vb2_v4l2_buffer vb;
+ dma_addr_t addr[3];
+ struct list_head queue;
+};
+
+struct isp_video;
+
+struct isp_video_ops {
+ int (*queue_buffer)(struct isp_video *vid, struct isp_buffer *buf);
+ int (*flush_buffers)(struct isp_video *vid,
+ enum vb2_buffer_state state);
+};
+
+struct isp_format_info;
+
+struct isp_video {
+ struct isp *isp;
+ struct vb2_queue vb2_q;
+ struct video_device vdev;
+ struct media_pad pad;
+ struct v4l2_format active_fmt;
+ enum v4l2_buf_type type;
+ struct media_pipeline pipe;
+ const struct isp_video_ops *ops;
+ struct mutex lock;
+ struct mutex q_lock;
+ unsigned int bpl_alignment;
+ unsigned int line_based;
+ unsigned int nformats;
+ unsigned int payload;
+ const struct isp_format_info *formats;
+};
+
+void isp_video_stop_streaming(struct isp_video *video);
+
+int isp_video_register(struct isp_video *video, struct v4l2_device *v4l2_dev,
+ const char *name);
+
+void isp_video_unregister(struct isp_video *video);
+
+#endif /* ISP_VIDEO_H */