linux/drivers/media/platform/ti/omap/omap_vout.c

/*
 * omap_vout.c
 *
 * Copyright (C) 2005-2010 Texas Instruments.
 *
 * This file is licensed under the terms of the GNU General Public License
 * version 2. This program is licensed "as is" without any warranty of any
 * kind, whether express or implied.
 *
 * Leveraged code from the OMAP2 camera driver
 * Video-for-Linux (Version 2) camera capture driver for
 * the OMAP24xx camera controller.
 *
 * Author: Andy Lowe ([email protected])
 *
 * Copyright (C) 2004 MontaVista Software, Inc.
 * Copyright (C) 2010 Texas Instruments.
 *
 * History:
 * 20-APR-2006 Khasim		Modified VRFB based Rotation,
 *				The image data is always read from 0 degree
 *				view and written
 *				to the virtual space of desired rotation angle
 * 4-DEC-2006  Jian		Changed to support better memory management
 *
 * 17-Nov-2008 Hardik		Changed driver to use video_ioctl2
 *
 * 23-Feb-2010 Vaibhav H	Modified to use new DSS2 interface
 *
 */

#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();

/* Driver Configuration macros */
#define VOUT_NAME

enum omap_vout_channels {};

/* Variables configurable through module params*/
static bool vid1_static_vrfb_alloc;
static bool vid2_static_vrfb_alloc;
static bool debug;

/* Module parameters */
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();

/* list of image formats supported by OMAP2 video pipelines */
static const struct v4l2_fmtdesc omap_formats[] =;

#define NUM_OUTPUT_FORMATS

/*
 * Try format
 */
static int omap_vout_try_format(struct v4l2_pix_format *pix)
{}

/*
 * Convert V4L2 rotation to DSS rotation
 *	V4L2 understand 0, 90, 180, 270.
 *	Convert to 0, 1, 2 and 3 respectively for DSS
 */
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)
{}

/*
 * Convert V4L2 pixel format to DSS pixel format
 */
static int video_mode_to_dss_mode(struct omap_vout_device *vout)
{}

/*
 * Setup the overlay
 */
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)
{}

/*
 * Initialize the overlay structure
 */
static int omapvid_init(struct omap_vout_device *vout, dma_addr_t addr)
{}

/*
 * Apply the changes set the go bit of DSS
 */
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)
{}


/*
 * V4L2 ioctls
 */
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 =;

/* Init functions used during driver initialization */
/* Initial setup of video_data */
static int __init omap_vout_setup_video_data(struct omap_vout_device *vout)
{}

/* Setup video buffers */
static int __init omap_vout_setup_video_bufs(struct platform_device *pdev,
		int vid_num)
{}

/* Create video out devices */
static int __init omap_vout_create_video_devices(struct platform_device *pdev)
{}
/* Driver functions */
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);