#include <linux/platform_device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include <media/videobuf2-dma-contig.h>
#include "mtk-mdp3-m2m.h"
static inline struct mdp_m2m_ctx *fh_to_ctx(struct v4l2_fh *fh)
{ … }
static inline struct mdp_m2m_ctx *ctrl_to_ctx(struct v4l2_ctrl *ctrl)
{ … }
static inline struct mdp_frame *ctx_get_frame(struct mdp_m2m_ctx *ctx,
enum v4l2_buf_type type)
{ … }
static inline void mdp_m2m_ctx_set_state(struct mdp_m2m_ctx *ctx, u32 state)
{ … }
static inline bool mdp_m2m_ctx_is_state_set(struct mdp_m2m_ctx *ctx, u32 mask)
{ … }
static void mdp_m2m_process_done(void *priv, int vb_state)
{ … }
static void mdp_m2m_device_run(void *priv)
{ … }
static int mdp_m2m_start_streaming(struct vb2_queue *q, unsigned int count)
{ … }
static struct vb2_v4l2_buffer *mdp_m2m_buf_remove(struct mdp_m2m_ctx *ctx,
unsigned int type)
{ … }
static void mdp_m2m_stop_streaming(struct vb2_queue *q)
{ … }
static int mdp_m2m_queue_setup(struct vb2_queue *q,
unsigned int *num_buffers,
unsigned int *num_planes, unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static int mdp_m2m_buf_prepare(struct vb2_buffer *vb)
{ … }
static int mdp_m2m_buf_out_validate(struct vb2_buffer *vb)
{ … }
static void mdp_m2m_buf_queue(struct vb2_buffer *vb)
{ … }
static const struct vb2_ops mdp_m2m_qops = …;
static int mdp_m2m_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
{ … }
static int mdp_m2m_enum_fmt_mplane(struct file *file, void *fh,
struct v4l2_fmtdesc *f)
{ … }
static int mdp_m2m_g_fmt_mplane(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int mdp_m2m_s_fmt_mplane(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int mdp_m2m_try_fmt_mplane(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int mdp_m2m_g_selection(struct file *file, void *fh,
struct v4l2_selection *s)
{ … }
static int mdp_m2m_s_selection(struct file *file, void *fh,
struct v4l2_selection *s)
{ … }
static const struct v4l2_ioctl_ops mdp_m2m_ioctl_ops = …;
static int mdp_m2m_queue_init(void *priv,
struct vb2_queue *src_vq,
struct vb2_queue *dst_vq)
{ … }
static int mdp_m2m_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops mdp_m2m_ctrl_ops = …;
static int mdp_m2m_ctrls_create(struct mdp_m2m_ctx *ctx)
{ … }
static int mdp_m2m_open(struct file *file)
{ … }
static int mdp_m2m_release(struct file *file)
{ … }
static const struct v4l2_file_operations mdp_m2m_fops = …;
static const struct v4l2_m2m_ops mdp_m2m_ops = …;
int mdp_m2m_device_register(struct mdp_dev *mdp)
{ … }
void mdp_m2m_device_unregister(struct mdp_dev *mdp)
{ … }
void mdp_m2m_job_finish(struct mdp_m2m_ctx *ctx)
{ … }