#include <linux/init.h>
#include <linux/module.h>
#include <linux/vmalloc.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/platform_device.h>
#include <linux/irq.h>
#include <linux/videodev2.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include <video/omapvrfb.h>
#include <video/omapfb_dss.h>
#include "omap_voutlib.h"
#include "omap_voutdef.h"
#include "omap_vout_vrfb.h"
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
#define VOUT_NAME …
enum omap_vout_channels { … };
static bool vid1_static_vrfb_alloc;
static bool vid2_static_vrfb_alloc;
static bool debug;
module_param(vid1_static_vrfb_alloc, bool, S_IRUGO);
MODULE_PARM_DESC(…) …;
module_param(vid2_static_vrfb_alloc, bool, S_IRUGO);
MODULE_PARM_DESC(…) …;
module_param(debug, bool, S_IRUGO);
MODULE_PARM_DESC(…) …;
static const struct v4l2_fmtdesc omap_formats[] = …;
#define NUM_OUTPUT_FORMATS …
static int omap_vout_try_format(struct v4l2_pix_format *pix)
{ … }
static int v4l2_rot_to_dss_rot(int v4l2_rotation,
enum dss_rotation *rotation, bool mirror)
{ … }
static int omap_vout_calculate_offset(struct omap_vout_device *vout)
{ … }
static int video_mode_to_dss_mode(struct omap_vout_device *vout)
{ … }
static int omapvid_setup_overlay(struct omap_vout_device *vout,
struct omap_overlay *ovl, int posx, int posy, int outw,
int outh, dma_addr_t addr)
{ … }
static int omapvid_init(struct omap_vout_device *vout, dma_addr_t addr)
{ … }
static int omapvid_apply_changes(struct omap_vout_device *vout)
{ … }
static int omapvid_handle_interlace_display(struct omap_vout_device *vout,
unsigned int irqstatus, u64 ts)
{ … }
static void omap_vout_isr(void *arg, unsigned int irqstatus)
{ … }
static int vidioc_querycap(struct file *file, void *fh,
struct v4l2_capability *cap)
{ … }
static int vidioc_enum_fmt_vid_out(struct file *file, void *fh,
struct v4l2_fmtdesc *fmt)
{ … }
static int vidioc_g_fmt_vid_out(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int vidioc_try_fmt_vid_out(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int vidioc_s_fmt_vid_out(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int vidioc_try_fmt_vid_overlay(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int vidioc_s_fmt_vid_overlay(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int vidioc_g_fmt_vid_overlay(struct file *file, void *fh,
struct v4l2_format *f)
{ … }
static int vidioc_g_selection(struct file *file, void *fh, struct v4l2_selection *sel)
{ … }
static int vidioc_s_selection(struct file *file, void *fh, struct v4l2_selection *sel)
{ … }
static int omap_vout_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops omap_vout_ctrl_ops = …;
static int omap_vout_vb2_queue_setup(struct vb2_queue *vq,
unsigned int *nbufs,
unsigned int *num_planes, unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static int omap_vout_vb2_prepare(struct vb2_buffer *vb)
{ … }
static void omap_vout_vb2_queue(struct vb2_buffer *vb)
{ … }
static int omap_vout_vb2_start_streaming(struct vb2_queue *vq, unsigned int count)
{ … }
static void omap_vout_vb2_stop_streaming(struct vb2_queue *vq)
{ … }
static int vidioc_s_fbuf(struct file *file, void *fh,
const struct v4l2_framebuffer *a)
{ … }
static int vidioc_g_fbuf(struct file *file, void *fh,
struct v4l2_framebuffer *a)
{ … }
static int vidioc_enum_output(struct file *file, void *priv_fh,
struct v4l2_output *out)
{ … }
static int vidioc_g_output(struct file *file, void *priv_fh, unsigned int *i)
{ … }
static int vidioc_s_output(struct file *file, void *priv_fh, unsigned int i)
{ … }
static const struct v4l2_ioctl_ops vout_ioctl_ops = …;
static const struct v4l2_file_operations omap_vout_fops = …;
static const struct vb2_ops omap_vout_vb2_ops = …;
static int __init omap_vout_setup_video_data(struct omap_vout_device *vout)
{ … }
static int __init omap_vout_setup_video_bufs(struct platform_device *pdev,
int vid_num)
{ … }
static int __init omap_vout_create_video_devices(struct platform_device *pdev)
{ … }
static void omap_vout_cleanup_device(struct omap_vout_device *vout)
{ … }
static void omap_vout_remove(struct platform_device *pdev)
{ … }
static int __init omap_vout_probe(struct platform_device *pdev)
{ … }
static struct platform_driver omap_vout_driver = …;
static int __init omap_vout_init(void)
{ … }
static void omap_vout_cleanup(void)
{ … }
late_initcall(omap_vout_init);
module_exit(omap_vout_cleanup);