linux/drivers/staging/media/imx/imx-media-capture.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Video Capture Subdev for Freescale i.MX5/6 SOC
 *
 * Copyright (c) 2012-2016 Mentor Graphics Inc.
 */
#include <linux/delay.h>
#include <linux/fs.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/timer.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-event.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-mc.h>
#include <media/v4l2-subdev.h>
#include <media/videobuf2-dma-contig.h>
#include <video/imx-ipu-v3.h>
#include <media/imx.h>
#include "imx-media.h"

#define IMX_CAPTURE_NAME

struct capture_priv {};

#define to_capture_priv(v)

/* In bytes, per queue */
#define VID_MEM_LIMIT

/* -----------------------------------------------------------------------------
 * MC-Centric Video IOCTLs
 */

static const struct imx_media_pixfmt *capture_find_format(u32 code, u32 fourcc)
{}

static int capture_querycap(struct file *file, void *fh,
			    struct v4l2_capability *cap)
{}

static int capture_enum_fmt_vid_cap(struct file *file, void *fh,
				    struct v4l2_fmtdesc *f)
{}

static int capture_enum_framesizes(struct file *file, void *fh,
				   struct v4l2_frmsizeenum *fsize)
{}

static int capture_g_fmt_vid_cap(struct file *file, void *fh,
				 struct v4l2_format *f)
{}

static const struct imx_media_pixfmt *
__capture_try_fmt(struct v4l2_pix_format *pixfmt, struct v4l2_rect *compose)
{}

static int capture_try_fmt_vid_cap(struct file *file, void *fh,
				   struct v4l2_format *f)
{}

static int capture_s_fmt_vid_cap(struct file *file, void *fh,
				 struct v4l2_format *f)
{}

static int capture_g_selection(struct file *file, void *fh,
			       struct v4l2_selection *s)
{}

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

static const struct v4l2_ioctl_ops capture_ioctl_ops =;

/* -----------------------------------------------------------------------------
 * Legacy Video IOCTLs
 */

static int capture_legacy_enum_framesizes(struct file *file, void *fh,
					  struct v4l2_frmsizeenum *fsize)
{}

static int capture_legacy_enum_frameintervals(struct file *file, void *fh,
					      struct v4l2_frmivalenum *fival)
{}

static int capture_legacy_enum_fmt_vid_cap(struct file *file, void *fh,
					   struct v4l2_fmtdesc *f)
{}

static const struct imx_media_pixfmt *
__capture_legacy_try_fmt(struct capture_priv *priv,
			 struct v4l2_subdev_format *fmt_src,
			 struct v4l2_pix_format *pixfmt)
{}

static int capture_legacy_try_fmt_vid_cap(struct file *file, void *fh,
					  struct v4l2_format *f)
{}

static int capture_legacy_s_fmt_vid_cap(struct file *file, void *fh,
					struct v4l2_format *f)
{}

static int capture_legacy_querystd(struct file *file, void *fh,
				   v4l2_std_id *std)
{}

static int capture_legacy_g_std(struct file *file, void *fh, v4l2_std_id *std)
{}

static int capture_legacy_s_std(struct file *file, void *fh, v4l2_std_id std)
{}

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

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

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

static const struct v4l2_ioctl_ops capture_legacy_ioctl_ops =;

/* -----------------------------------------------------------------------------
 * Queue Operations
 */

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

static int capture_buf_init(struct vb2_buffer *vb)
{}

static int capture_buf_prepare(struct vb2_buffer *vb)
{}

static void capture_buf_queue(struct vb2_buffer *vb)
{}

static int capture_validate_fmt(struct capture_priv *priv)
{}

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

static void capture_stop_streaming(struct vb2_queue *vq)
{}

static const struct vb2_ops capture_qops =;

/* -----------------------------------------------------------------------------
 * File Operations
 */

static int capture_open(struct file *file)
{}

static int capture_release(struct file *file)
{}

static const struct v4l2_file_operations capture_fops =;

/* -----------------------------------------------------------------------------
 * Public API
 */

struct imx_media_buffer *
imx_media_capture_device_next_buf(struct imx_media_video_dev *vdev)
{}
EXPORT_SYMBOL_GPL();

void imx_media_capture_device_error(struct imx_media_video_dev *vdev)
{}
EXPORT_SYMBOL_GPL();

static int capture_init_format(struct capture_priv *priv)
{}

int imx_media_capture_device_register(struct imx_media_video_dev *vdev,
				      u32 link_flags)
{}
EXPORT_SYMBOL_GPL();

void imx_media_capture_device_unregister(struct imx_media_video_dev *vdev)
{}
EXPORT_SYMBOL_GPL();

struct imx_media_video_dev *
imx_media_capture_device_init(struct device *dev, struct v4l2_subdev *src_sd,
			      int pad, bool legacy_api)
{}
EXPORT_SYMBOL_GPL();

void imx_media_capture_device_remove(struct imx_media_video_dev *vdev)
{}
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();