1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Qualcomm MSM Camera Subsystem - V4L2 device node
7 * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
8 * Copyright (C) 2015-2018 Linaro Ltd.
10 #ifndef QC_MSM_CAMSS_VIDEO_H
11 #define QC_MSM_CAMSS_VIDEO_H
13 #include <linux/mutex.h>
14 #include <linux/videodev2.h>
15 #include <media/media-entity.h>
16 #include <media/v4l2-dev.h>
17 #include <media/v4l2-device.h>
18 #include <media/v4l2-fh.h>
19 #include <media/v4l2-mediabus.h>
20 #include <media/videobuf2-v4l2.h>
23 struct vb2_v4l2_buffer vb
;
25 struct list_head queue
;
30 struct camss_video_ops
{
31 int (*queue_buffer
)(struct camss_video
*vid
, struct camss_buffer
*buf
);
32 int (*flush_buffers
)(struct camss_video
*vid
,
33 enum vb2_buffer_state state
);
36 struct camss_format_info
;
40 struct vb2_queue vb2_q
;
41 struct video_device vdev
;
43 struct v4l2_format active_fmt
;
44 enum v4l2_buf_type type
;
45 struct media_pipeline pipe
;
46 const struct camss_video_ops
*ops
;
49 unsigned int bpl_alignment
;
50 unsigned int line_based
;
51 const struct camss_format_info
*formats
;
52 unsigned int nformats
;
55 void msm_video_stop_streaming(struct camss_video
*video
);
57 int msm_video_register(struct camss_video
*video
, struct v4l2_device
*v4l2_dev
,
58 const char *name
, int is_pix
);
60 void msm_video_unregister(struct camss_video
*video
);
62 #endif /* QC_MSM_CAMSS_VIDEO_H */