#include <linux/clk.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/timer.h>
#include <linux/platform_device.h>
#include <media/v4l2-device.h>
#include <media/v4l2-event.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-mem2mem.h>
#include <media/videobuf2-dma-sg.h>
#include <media/videobuf2-v4l2.h>
#include "rga-hw.h"
#include "rga.h"
static int debug;
module_param(debug, int, 0644);
static void device_run(void *prv)
{ … }
static irqreturn_t rga_isr(int irq, void *prv)
{ … }
static const struct v4l2_m2m_ops rga_m2m_ops = …;
static int
queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq)
{ … }
static int rga_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops rga_ctrl_ops = …;
static int rga_setup_ctrls(struct rga_ctx *ctx)
{ … }
static struct rga_fmt formats[] = …;
#define NUM_FORMATS …
static struct rga_fmt *rga_fmt_find(u32 pixelformat)
{ … }
static struct rga_frame def_frame = …;
struct rga_frame *rga_get_frame(struct rga_ctx *ctx, enum v4l2_buf_type type)
{ … }
static int rga_open(struct file *file)
{ … }
static int rga_release(struct file *file)
{ … }
static const struct v4l2_file_operations rga_fops = …;
static int
vidioc_querycap(struct file *file, void *priv, struct v4l2_capability *cap)
{ … }
static int vidioc_enum_fmt(struct file *file, void *prv, struct v4l2_fmtdesc *f)
{ … }
static int vidioc_g_fmt(struct file *file, void *prv, struct v4l2_format *f)
{ … }
static int vidioc_try_fmt(struct file *file, void *prv, struct v4l2_format *f)
{ … }
static int vidioc_s_fmt(struct file *file, void *prv, struct v4l2_format *f)
{ … }
static int vidioc_g_selection(struct file *file, void *prv,
struct v4l2_selection *s)
{ … }
static int vidioc_s_selection(struct file *file, void *prv,
struct v4l2_selection *s)
{ … }
static const struct v4l2_ioctl_ops rga_ioctl_ops = …;
static const struct video_device rga_videodev = …;
static int rga_enable_clocks(struct rockchip_rga *rga)
{ … }
static void rga_disable_clocks(struct rockchip_rga *rga)
{ … }
static int rga_parse_dt(struct rockchip_rga *rga)
{ … }
static int rga_probe(struct platform_device *pdev)
{ … }
static void rga_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused rga_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused rga_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops rga_pm = …;
static const struct of_device_id rockchip_rga_match[] = …;
MODULE_DEVICE_TABLE(of, rockchip_rga_match);
static struct platform_driver rga_pdrv = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;