#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/timer.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-mc.h>
#include <media/v4l2-subdev.h>
#include <media/imx.h>
#include "imx-media.h"
#include "imx-ic.h"
#define MIN_W_SINK …
#define MIN_H_SINK …
#define MAX_W_SINK …
#define MAX_H_SINK …
#define W_ALIGN_SINK …
#define H_ALIGN_SINK …
#define MAX_W_SRC …
#define MAX_H_SRC …
#define W_ALIGN_SRC …
#define H_ALIGN_SRC …
#define S_ALIGN …
struct prp_priv { … };
static const struct prp_channels { … } prp_channel[] = …;
static inline struct prp_priv *sd_to_priv(struct v4l2_subdev *sd)
{ … }
static void prp_put_ipu_resources(struct prp_priv *priv)
{ … }
static int prp_get_ipu_resources(struct prp_priv *priv)
{ … }
static void prp_vb2_buf_done(struct prp_priv *priv, struct ipuv3_channel *ch)
{ … }
static irqreturn_t prp_eof_interrupt(int irq, void *dev_id)
{ … }
static irqreturn_t prp_nfb4eof_interrupt(int irq, void *dev_id)
{ … }
static void prp_eof_timeout(struct timer_list *t)
{ … }
static void prp_setup_vb2_buf(struct prp_priv *priv, dma_addr_t *phys)
{ … }
static void prp_unsetup_vb2_buf(struct prp_priv *priv,
enum vb2_buffer_state return_status)
{ … }
static int prp_setup_channel(struct prp_priv *priv,
struct ipuv3_channel *channel,
enum ipu_rotate_mode rot_mode,
dma_addr_t addr0, dma_addr_t addr1,
bool rot_swap_width_height)
{ … }
static int prp_setup_rotation(struct prp_priv *priv)
{ … }
static void prp_unsetup_rotation(struct prp_priv *priv)
{ … }
static int prp_setup_norotation(struct prp_priv *priv)
{ … }
static void prp_unsetup_norotation(struct prp_priv *priv)
{ … }
static void prp_unsetup(struct prp_priv *priv,
enum vb2_buffer_state state)
{ … }
static int prp_start(struct prp_priv *priv)
{ … }
static void prp_stop(struct prp_priv *priv)
{ … }
static struct v4l2_mbus_framefmt *
__prp_get_fmt(struct prp_priv *priv, struct v4l2_subdev_state *sd_state,
unsigned int pad, enum v4l2_subdev_format_whence which)
{ … }
static bool prp_bound_align_output(struct v4l2_mbus_framefmt *outfmt,
struct v4l2_mbus_framefmt *infmt,
enum ipu_rotate_mode rot_mode)
{ … }
static int prp_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{ … }
static int prp_get_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *sdformat)
{ … }
static void prp_try_fmt(struct prp_priv *priv,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *sdformat,
const struct imx_media_pixfmt **cc)
{ … }
static int prp_set_fmt(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_format *sdformat)
{ … }
static int prp_enum_frame_size(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_size_enum *fse)
{ … }
static int prp_link_setup(struct media_entity *entity,
const struct media_pad *local,
const struct media_pad *remote, u32 flags)
{ … }
static int prp_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops prp_ctrl_ops = …;
static int prp_init_controls(struct prp_priv *priv)
{ … }
static int prp_s_stream(struct v4l2_subdev *sd, int enable)
{ … }
static int prp_get_frame_interval(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_interval *fi)
{ … }
static int prp_set_frame_interval(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_frame_interval *fi)
{ … }
static int prp_registered(struct v4l2_subdev *sd)
{ … }
static void prp_unregistered(struct v4l2_subdev *sd)
{ … }
static const struct v4l2_subdev_pad_ops prp_pad_ops = …;
static const struct v4l2_subdev_video_ops prp_video_ops = …;
static const struct media_entity_operations prp_entity_ops = …;
static const struct v4l2_subdev_ops prp_subdev_ops = …;
static const struct v4l2_subdev_internal_ops prp_internal_ops = …;
static int prp_init(struct imx_ic_priv *ic_priv)
{ … }
static void prp_remove(struct imx_ic_priv *ic_priv)
{ … }
struct imx_ic_ops imx_ic_prpencvf_ops = …;