linux/drivers/media/platform/samsung/exynos4-is/fimc-isp-video.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Samsung EXYNOS4x12 FIMC-IS (Imaging Subsystem) driver
 *
 * FIMC-IS ISP video input and video output DMA interface driver
 *
 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
 * Author: Sylwester Nawrocki <[email protected]>
 *
 * The hardware handling code derived from a driver written by
 * Younghwan Joo <[email protected]>.
 */

#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/printk.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/videodev2.h>

#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-contig.h>
#include <media/drv-intf/exynos-fimc.h>

#include "common.h"
#include "media-dev.h"
#include "fimc-is.h"
#include "fimc-isp-video.h"
#include "fimc-is-param.h"

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

static inline struct param_dma_output *__get_isp_dma2(struct fimc_is *is)
{}

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

static void isp_video_capture_stop_streaming(struct vb2_queue *q)
{}

static int isp_video_capture_buffer_prepare(struct vb2_buffer *vb)
{}

static void isp_video_capture_buffer_queue(struct vb2_buffer *vb)
{}

/*
 * FIMC-IS ISP input and output DMA interface interrupt handler.
 * Locking: called with is->slock spinlock held.
 */
void fimc_isp_video_irq_handler(struct fimc_is *is)
{}

static const struct vb2_ops isp_video_capture_qops =;

static int isp_video_open(struct file *file)
{}

static int isp_video_release(struct file *file)
{}

static const struct v4l2_file_operations isp_video_fops =;

/*
 * Video node ioctl operations
 */
static int isp_video_querycap(struct file *file, void *priv,
					struct v4l2_capability *cap)
{}

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

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

static void __isp_video_try_fmt(struct fimc_isp *isp,
				struct v4l2_pix_format_mplane *pixm,
				const struct fimc_fmt **fmt)
{}

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

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

/*
 * Check for source/sink format differences at each link.
 * Return 0 if the formats match or -EPIPE otherwise.
 */
static int isp_video_pipeline_validate(struct fimc_isp *isp)
{}

static int isp_video_streamon(struct file *file, void *priv,
				      enum v4l2_buf_type type)
{}

static int isp_video_streamoff(struct file *file, void *priv,
					enum v4l2_buf_type type)
{}

static int isp_video_reqbufs(struct file *file, void *priv,
				struct v4l2_requestbuffers *rb)
{}

static const struct v4l2_ioctl_ops isp_video_ioctl_ops =;

int fimc_isp_video_device_register(struct fimc_isp *isp,
				   struct v4l2_device *v4l2_dev,
				   enum v4l2_buf_type type)
{}

void fimc_isp_video_device_unregister(struct fimc_isp *isp,
				      enum v4l2_buf_type type)
{}