#include <linux/slab.h>
#include <media/media-entity.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-mc.h>
#include <media/videobuf2-dma-sg.h>
#include "camss-video.h"
#include "camss.h"
#define CAMSS_FRAME_MIN_WIDTH …
#define CAMSS_FRAME_MAX_WIDTH …
#define CAMSS_FRAME_MIN_HEIGHT …
#define CAMSS_FRAME_MAX_HEIGHT_RDI …
#define CAMSS_FRAME_MAX_HEIGHT_PIX …
static int video_mbus_to_pix_mp(const struct v4l2_mbus_framefmt *mbus,
struct v4l2_pix_format_mplane *pix,
const struct camss_format_info *f,
unsigned int alignment)
{ … }
static struct v4l2_subdev *video_remote_subdev(struct camss_video *video,
u32 *pad)
{ … }
static int video_get_subdev_format(struct camss_video *video,
struct v4l2_format *format)
{ … }
static int video_queue_setup(struct vb2_queue *q,
unsigned int *num_buffers, unsigned int *num_planes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static int video_buf_init(struct vb2_buffer *vb)
{ … }
static int video_buf_prepare(struct vb2_buffer *vb)
{ … }
static void video_buf_queue(struct vb2_buffer *vb)
{ … }
static int video_check_format(struct camss_video *video)
{ … }
static int video_start_streaming(struct vb2_queue *q, unsigned int count)
{ … }
static void video_stop_streaming(struct vb2_queue *q)
{ … }
static const struct vb2_ops msm_video_vb2_q_ops = …;
static int video_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
{ … }
static int video_enum_fmt(struct file *file, void *fh, struct v4l2_fmtdesc *f)
{ … }
static int video_enum_framesizes(struct file *file, void *fh,
struct v4l2_frmsizeenum *fsize)
{ … }
static int video_g_fmt(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int __video_try_fmt(struct camss_video *video, struct v4l2_format *f)
{ … }
static int video_try_fmt(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int video_s_fmt(struct file *file, void *fh, struct v4l2_format *f)
{ … }
static int video_enum_input(struct file *file, void *fh,
struct v4l2_input *input)
{ … }
static int video_g_input(struct file *file, void *fh, unsigned int *input)
{ … }
static int video_s_input(struct file *file, void *fh, unsigned int input)
{ … }
static const struct v4l2_ioctl_ops msm_vid_ioctl_ops = …;
static int video_open(struct file *file)
{ … }
static int video_release(struct file *file)
{ … }
static const struct v4l2_file_operations msm_vid_fops = …;
static void msm_video_release(struct video_device *vdev)
{ … }
static int msm_video_init_format(struct camss_video *video)
{ … }
int msm_video_register(struct camss_video *video, struct v4l2_device *v4l2_dev,
const char *name)
{ … }
void msm_video_unregister(struct camss_video *video)
{ … }