#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/bug.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/list.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/clk.h>
#include <media/v4l2-ioctl.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-contig.h>
#include "common.h"
#include "fimc-core.h"
#include "fimc-reg.h"
#include "media-dev.h"
static unsigned int get_m2m_fmt_flags(unsigned int stream_type)
{ … }
void fimc_m2m_job_finish(struct fimc_ctx *ctx, int vb_state)
{ … }
static void fimc_m2m_shutdown(struct fimc_ctx *ctx)
{ … }
static int start_streaming(struct vb2_queue *q, unsigned int count)
{ … }
static void stop_streaming(struct vb2_queue *q)
{ … }
static void fimc_device_run(void *priv)
{ … }
static void fimc_job_abort(void *priv)
{ … }
static int fimc_queue_setup(struct vb2_queue *vq,
unsigned int *num_buffers, unsigned int *num_planes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static int fimc_buf_prepare(struct vb2_buffer *vb)
{ … }
static void fimc_buf_queue(struct vb2_buffer *vb)
{ … }
static const struct vb2_ops fimc_qops = …;
static int fimc_m2m_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
{ … }
static int fimc_m2m_enum_fmt(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int fimc_m2m_g_fmt_mplane(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int fimc_try_fmt_mplane(struct fimc_ctx *ctx, struct v4l2_format *f)
{ … }
static int fimc_m2m_try_fmt_mplane(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static void __set_frame_format(struct fimc_frame *frame,
const struct fimc_fmt *fmt,
const struct v4l2_pix_format_mplane *pixm)
{ … }
static int fimc_m2m_s_fmt_mplane(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int fimc_m2m_g_selection(struct file *file, void *fh,
struct v4l2_selection *s)
{ … }
static int fimc_m2m_try_selection(struct fimc_ctx *ctx,
struct v4l2_selection *s)
{ … }
static int fimc_m2m_s_selection(struct file *file, void *fh,
struct v4l2_selection *s)
{ … }
static const struct v4l2_ioctl_ops fimc_m2m_ioctl_ops = …;
static int queue_init(void *priv, struct vb2_queue *src_vq,
struct vb2_queue *dst_vq)
{ … }
static int fimc_m2m_set_default_format(struct fimc_ctx *ctx)
{ … }
static int fimc_m2m_open(struct file *file)
{ … }
static int fimc_m2m_release(struct file *file)
{ … }
static const struct v4l2_file_operations fimc_m2m_fops = …;
static const struct v4l2_m2m_ops m2m_ops = …;
int fimc_register_m2m_device(struct fimc_dev *fimc,
struct v4l2_device *v4l2_dev)
{ … }
void fimc_unregister_m2m_device(struct fimc_dev *fimc)
{ … }