linux/drivers/media/pci/mgb4/mgb4_vout.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (C) 2021-2023 Digiteq Automotive
 *     author: Martin Tuma <[email protected]>
 *
 * This is the v4l2 output device module. It initializes the signal serializers
 * and creates the v4l2 video devices.
 *
 * When the device is in loopback mode (a direct, in HW, in->out frame passing
 * mode) we disable the v4l2 output by returning EBUSY in the open() syscall.
 */

#include <linux/pci.h>
#include <linux/align.h>
#include <linux/dma/amd_xdma.h>
#include <media/v4l2-ioctl.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-sg.h>
#include <media/v4l2-dv-timings.h>
#include "mgb4_core.h"
#include "mgb4_dma.h"
#include "mgb4_sysfs.h"
#include "mgb4_io.h"
#include "mgb4_cmt.h"
#include "mgb4_vout.h"

#define DEFAULT_WIDTH
#define DEFAULT_HEIGHT
#define DEFAULT_PERIOD

ATTRIBUTE_GROUPS();
ATTRIBUTE_GROUPS();

static const struct mgb4_vout_config vout_cfg[] =;

static const struct i2c_board_info fpdl3_ser_info[] =;

static const struct mgb4_i2c_kv fpdl3_i2c[] =;

static const struct v4l2_dv_timings_cap video_timings_cap =;

static void get_timings(struct mgb4_vout_dev *voutdev,
			struct v4l2_dv_timings *timings)
{}

static void return_all_buffers(struct mgb4_vout_dev *voutdev,
			       enum vb2_buffer_state state)
{}

static int queue_setup(struct vb2_queue *q, unsigned int *nbuffers,
		       unsigned int *nplanes, unsigned int sizes[],
		       struct device *alloc_devs[])
{}

static int buffer_init(struct vb2_buffer *vb)
{}

static int buffer_prepare(struct vb2_buffer *vb)
{}

static void buffer_queue(struct vb2_buffer *vb)
{}

static void stop_streaming(struct vb2_queue *vq)
{}

static int start_streaming(struct vb2_queue *vq, unsigned int count)
{}

static const struct vb2_ops queue_ops =;

static int vidioc_querycap(struct file *file, void *priv,
			   struct v4l2_capability *cap)
{}

static int vidioc_enum_fmt(struct file *file, void *priv,
			   struct v4l2_fmtdesc *f)
{}

static int vidioc_g_fmt(struct file *file, void *priv, struct v4l2_format *f)
{}

static int vidioc_try_fmt(struct file *file, void *priv, struct v4l2_format *f)
{}

static int vidioc_s_fmt(struct file *file, void *priv, struct v4l2_format *f)
{}

static int vidioc_g_output(struct file *file, void *priv, unsigned int *i)
{}

static int vidioc_s_output(struct file *file, void *priv, unsigned int i)
{}

static int vidioc_enum_output(struct file *file, void *priv,
			      struct v4l2_output *out)
{}

static int vidioc_enum_frameintervals(struct file *file, void *priv,
				      struct v4l2_frmivalenum *ival)
{}

static int vidioc_g_parm(struct file *file, void *priv,
			 struct v4l2_streamparm *parm)
{}

static int vidioc_s_parm(struct file *file, void *priv,
			 struct v4l2_streamparm *parm)
{}

static int vidioc_g_dv_timings(struct file *file, void *fh,
			       struct v4l2_dv_timings *timings)
{}

static int vidioc_s_dv_timings(struct file *file, void *fh,
			       struct v4l2_dv_timings *timings)
{}

static int vidioc_enum_dv_timings(struct file *file, void *fh,
				  struct v4l2_enum_dv_timings *timings)
{}

static int vidioc_dv_timings_cap(struct file *file, void *fh,
				 struct v4l2_dv_timings_cap *cap)
{}

static const struct v4l2_ioctl_ops video_ioctl_ops =;

static int fh_open(struct file *file)
{}

static const struct v4l2_file_operations video_fops =;

static void dma_transfer(struct work_struct *work)
{}

static irqreturn_t handler(int irq, void *ctx)
{}

static int ser_init(struct mgb4_vout_dev *voutdev, int id)
{}

static void fpga_init(struct mgb4_vout_dev *voutdev)
{}

#ifdef CONFIG_DEBUG_FS
static void debugfs_init(struct mgb4_vout_dev *voutdev)
{}
#endif

struct mgb4_vout_dev *mgb4_vout_create(struct mgb4_dev *mgbdev, int id)
{}

void mgb4_vout_free(struct mgb4_vout_dev *voutdev)
{}