#include <linux/module.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <video/imx-ipu-v3.h>
#include <video/imx-ipu-image-convert.h>
#include <media/media-device.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <media/v4l2-mem2mem.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/videobuf2-dma-contig.h>
#include "imx-media.h"
#define fh_to_ctx(__fh) …
#define IMX_CSC_SCALER_NAME …
enum { … };
struct ipu_csc_scaler_priv { … };
#define vdev_to_priv(v) …
struct ipu_csc_scaler_q_data { … };
struct ipu_csc_scaler_ctx { … };
static struct ipu_csc_scaler_q_data *get_q_data(struct ipu_csc_scaler_ctx *ctx,
enum v4l2_buf_type type)
{ … }
static void job_abort(void *_ctx)
{ … }
static void ipu_ic_pp_complete(struct ipu_image_convert_run *run, void *_ctx)
{ … }
static void device_run(void *_ctx)
{ … }
static int ipu_csc_scaler_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{ … }
static int ipu_csc_scaler_enum_fmt(struct file *file, void *fh,
struct v4l2_fmtdesc *f)
{ … }
static int ipu_csc_scaler_g_fmt(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int ipu_csc_scaler_try_fmt(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int ipu_csc_scaler_s_fmt(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int ipu_csc_scaler_g_selection(struct file *file, void *priv,
struct v4l2_selection *s)
{ … }
static int ipu_csc_scaler_s_selection(struct file *file, void *priv,
struct v4l2_selection *s)
{ … }
static const struct v4l2_ioctl_ops ipu_csc_scaler_ioctl_ops = …;
static int ipu_csc_scaler_queue_setup(struct vb2_queue *vq,
unsigned int *nbuffers,
unsigned int *nplanes,
unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static int ipu_csc_scaler_buf_prepare(struct vb2_buffer *vb)
{ … }
static void ipu_csc_scaler_buf_queue(struct vb2_buffer *vb)
{ … }
static void ipu_image_from_q_data(struct ipu_image *im,
struct ipu_csc_scaler_q_data *q_data)
{ … }
static int ipu_csc_scaler_start_streaming(struct vb2_queue *q,
unsigned int count)
{ … }
static void ipu_csc_scaler_stop_streaming(struct vb2_queue *q)
{ … }
static const struct vb2_ops ipu_csc_scaler_qops = …;
static int ipu_csc_scaler_queue_init(void *priv, struct vb2_queue *src_vq,
struct vb2_queue *dst_vq)
{ … }
static int ipu_csc_scaler_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops ipu_csc_scaler_ctrl_ops = …;
static int ipu_csc_scaler_init_controls(struct ipu_csc_scaler_ctx *ctx)
{ … }
#define DEFAULT_WIDTH …
#define DEFAULT_HEIGHT …
static const struct ipu_csc_scaler_q_data ipu_csc_scaler_q_data_default = …;
static int ipu_csc_scaler_open(struct file *file)
{ … }
static int ipu_csc_scaler_release(struct file *file)
{ … }
static const struct v4l2_file_operations ipu_csc_scaler_fops = …;
static const struct v4l2_m2m_ops m2m_ops = …;
static void ipu_csc_scaler_video_device_release(struct video_device *vdev)
{ … }
static const struct video_device ipu_csc_scaler_videodev_template = …;
int imx_media_csc_scaler_device_register(struct imx_media_video_dev *vdev)
{ … }
void imx_media_csc_scaler_device_unregister(struct imx_media_video_dev *vdev)
{ … }
struct imx_media_video_dev *
imx_media_csc_scaler_device_init(struct imx_media_dev *md)
{ … }
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;