linux/drivers/media/pci/cobalt/cobalt-v4l2.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  cobalt V4L2 API
 *
 *  Derived from ivtv-ioctl.c and cx18-fileops.c
 *
 *  Copyright 2012-2015 Cisco Systems, Inc. and/or its affiliates.
 *  All rights reserved.
 */

#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/math64.h>
#include <linux/pci.h>
#include <linux/v4l2-dv-timings.h>

#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <media/v4l2-dv-timings.h>
#include <media/i2c/adv7604.h>
#include <media/i2c/adv7842.h>

#include "cobalt-alsa.h"
#include "cobalt-cpld.h"
#include "cobalt-driver.h"
#include "cobalt-v4l2.h"
#include "cobalt-irq.h"
#include "cobalt-omnitek.h"

static const struct v4l2_dv_timings cea1080p60 =;

/* vb2 DMA streaming ops */

static int cobalt_queue_setup(struct vb2_queue *q,
			unsigned int *num_buffers, unsigned int *num_planes,
			unsigned int sizes[], struct device *alloc_devs[])
{}

static int cobalt_buf_init(struct vb2_buffer *vb)
{}

static void cobalt_buf_cleanup(struct vb2_buffer *vb)
{}

static int cobalt_buf_prepare(struct vb2_buffer *vb)
{}

static void chain_all_buffers(struct cobalt_stream *s)
{}

static void cobalt_buf_queue(struct vb2_buffer *vb)
{}

static void cobalt_enable_output(struct cobalt_stream *s)
{}

static void cobalt_enable_input(struct cobalt_stream *s)
{}

static void cobalt_dma_start_streaming(struct cobalt_stream *s)
{}

static int cobalt_start_streaming(struct vb2_queue *q, unsigned int count)
{}

static void cobalt_dma_stop_streaming(struct cobalt_stream *s)
{}

static void cobalt_stop_streaming(struct vb2_queue *q)
{}

static const struct vb2_ops cobalt_qops =;

/* V4L2 ioctls */

#ifdef CONFIG_VIDEO_ADV_DEBUG
static int cobalt_cobaltc(struct cobalt *cobalt, unsigned int cmd, void *arg)
{}

static int cobalt_g_register(struct file *file, void *priv_fh,
		struct v4l2_dbg_register *reg)
{}

static int cobalt_s_register(struct file *file, void *priv_fh,
		const struct v4l2_dbg_register *reg)
{}
#endif

static int cobalt_querycap(struct file *file, void *priv_fh,
				struct v4l2_capability *vcap)
{}

static void cobalt_video_input_status_show(struct cobalt_stream *s)
{}

static int cobalt_log_status(struct file *file, void *priv_fh)
{}

static int cobalt_enum_dv_timings(struct file *file, void *priv_fh,
				    struct v4l2_enum_dv_timings *timings)
{}

static int cobalt_s_dv_timings(struct file *file, void *priv_fh,
				    struct v4l2_dv_timings *timings)
{}

static int cobalt_g_dv_timings(struct file *file, void *priv_fh,
				    struct v4l2_dv_timings *timings)
{}

static int cobalt_query_dv_timings(struct file *file, void *priv_fh,
				    struct v4l2_dv_timings *timings)
{}

static int cobalt_dv_timings_cap(struct file *file, void *priv_fh,
				    struct v4l2_dv_timings_cap *cap)
{}

static int cobalt_enum_fmt_vid_cap(struct file *file, void *priv_fh,
		struct v4l2_fmtdesc *f)
{}

static int cobalt_g_fmt_vid_cap(struct file *file, void *priv_fh,
		struct v4l2_format *f)
{}

static int cobalt_try_fmt_vid_cap(struct file *file, void *priv_fh,
		struct v4l2_format *f)
{}

static int cobalt_s_fmt_vid_cap(struct file *file, void *priv_fh,
		struct v4l2_format *f)
{}

static int cobalt_try_fmt_vid_out(struct file *file, void *priv_fh,
		struct v4l2_format *f)
{}

static int cobalt_g_fmt_vid_out(struct file *file, void *priv_fh,
		struct v4l2_format *f)
{}

static int cobalt_enum_fmt_vid_out(struct file *file, void *priv_fh,
		struct v4l2_fmtdesc *f)
{}

static int cobalt_s_fmt_vid_out(struct file *file, void *priv_fh,
		struct v4l2_format *f)
{}

static int cobalt_enum_input(struct file *file, void *priv_fh,
				 struct v4l2_input *inp)
{}

static int cobalt_g_input(struct file *file, void *priv_fh, unsigned int *i)
{}

static int cobalt_s_input(struct file *file, void *priv_fh, unsigned int i)
{}

static int cobalt_enum_output(struct file *file, void *priv_fh,
				 struct v4l2_output *out)
{}

static int cobalt_g_output(struct file *file, void *priv_fh, unsigned int *i)
{}

static int cobalt_s_output(struct file *file, void *priv_fh, unsigned int i)
{}

static int cobalt_g_edid(struct file *file, void *fh, struct v4l2_edid *edid)
{}

static int cobalt_s_edid(struct file *file, void *fh, struct v4l2_edid *edid)
{}

static int cobalt_subscribe_event(struct v4l2_fh *fh,
				  const struct v4l2_event_subscription *sub)
{}

static int cobalt_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
{}

static int cobalt_g_pixelaspect(struct file *file, void *fh,
				int type, struct v4l2_fract *f)
{}

static int cobalt_g_selection(struct file *file, void *fh,
			      struct v4l2_selection *sel)
{}

static const struct v4l2_ioctl_ops cobalt_ioctl_ops =;

static const struct v4l2_ioctl_ops cobalt_ioctl_empty_ops =;

/* Register device nodes */

static const struct v4l2_file_operations cobalt_fops =;

static const struct v4l2_file_operations cobalt_out_fops =;

static const struct v4l2_file_operations cobalt_empty_fops =;

static int cobalt_node_register(struct cobalt *cobalt, int node)
{}

/* Initialize v4l2 variables and register v4l2 devices */
int cobalt_nodes_register(struct cobalt *cobalt)
{}

/* Unregister v4l2 devices */
void cobalt_nodes_unregister(struct cobalt *cobalt)
{}