linux/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright (c) 2011-2018 Magewell Electronics Co., Ltd. (Nanjing)
 * Author: Yong Deng <[email protected]>
 * Copyright 2021-2022 Bootlin
 * Author: Paul Kocialkowski <[email protected]>
 */

#include <linux/of.h>
#include <linux/regmap.h>
#include <media/v4l2-device.h>
#include <media/v4l2-event.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-mc.h>
#include <media/videobuf2-dma-contig.h>
#include <media/videobuf2-v4l2.h>

#include "sun6i_csi.h"
#include "sun6i_csi_bridge.h"
#include "sun6i_csi_capture.h"
#include "sun6i_csi_reg.h"

/* Helpers */

void sun6i_csi_capture_dimensions(struct sun6i_csi_device *csi_dev,
				  unsigned int *width, unsigned int *height)
{}

void sun6i_csi_capture_format(struct sun6i_csi_device *csi_dev,
			      u32 *pixelformat, u32 *field)
{}

/* Format */

static const struct sun6i_csi_capture_format sun6i_csi_capture_formats[] =;

const
struct sun6i_csi_capture_format *sun6i_csi_capture_format_find(u32 pixelformat)
{}

/* RAW formats need an exact match between pixel and mbus formats. */
static const
struct sun6i_csi_capture_format_match sun6i_csi_capture_format_matches[] =;

static bool sun6i_csi_capture_format_match(u32 pixelformat, u32 mbus_code)
{}

/* Capture */

static void
sun6i_csi_capture_buffer_configure(struct sun6i_csi_device *csi_dev,
				   struct sun6i_csi_buffer *csi_buffer)
{}

void sun6i_csi_capture_configure(struct sun6i_csi_device *csi_dev)
{}

/* State */

static void sun6i_csi_capture_state_cleanup(struct sun6i_csi_device *csi_dev,
					    bool error)
{}

void sun6i_csi_capture_state_update(struct sun6i_csi_device *csi_dev)
{}

static void sun6i_csi_capture_state_complete(struct sun6i_csi_device *csi_dev)
{}

void sun6i_csi_capture_frame_done(struct sun6i_csi_device *csi_dev)
{}

void sun6i_csi_capture_sync(struct sun6i_csi_device *csi_dev)
{}

/* Queue */

static int sun6i_csi_capture_queue_setup(struct vb2_queue *queue,
					 unsigned int *buffers_count,
					 unsigned int *planes_count,
					 unsigned int sizes[],
					 struct device *alloc_devs[])
{}

static int sun6i_csi_capture_buffer_prepare(struct vb2_buffer *buffer)
{}

static void sun6i_csi_capture_buffer_queue(struct vb2_buffer *buffer)
{}

static int sun6i_csi_capture_start_streaming(struct vb2_queue *queue,
					     unsigned int count)
{}

static void sun6i_csi_capture_stop_streaming(struct vb2_queue *queue)
{}

static const struct vb2_ops sun6i_csi_capture_queue_ops =;

/* V4L2 Device */

static void sun6i_csi_capture_format_prepare(struct v4l2_format *format)
{}

static int sun6i_csi_capture_querycap(struct file *file, void *private,
				      struct v4l2_capability *capability)
{}

static int sun6i_csi_capture_enum_fmt(struct file *file, void *private,
				      struct v4l2_fmtdesc *fmtdesc)
{}

static int sun6i_csi_capture_g_fmt(struct file *file, void *private,
				   struct v4l2_format *format)
{}

static int sun6i_csi_capture_s_fmt(struct file *file, void *private,
				   struct v4l2_format *format)
{}

static int sun6i_csi_capture_try_fmt(struct file *file, void *private,
				     struct v4l2_format *format)
{}

static int sun6i_csi_capture_enum_input(struct file *file, void *private,
					struct v4l2_input *input)
{}

static int sun6i_csi_capture_g_input(struct file *file, void *private,
				     unsigned int *index)
{}

static int sun6i_csi_capture_s_input(struct file *file, void *private,
				     unsigned int index)
{}

static const struct v4l2_ioctl_ops sun6i_csi_capture_ioctl_ops =;

/* V4L2 File */

static int sun6i_csi_capture_open(struct file *file)
{}

static int sun6i_csi_capture_close(struct file *file)
{}

static const struct v4l2_file_operations sun6i_csi_capture_fops =;

/* Media Entity */

static int sun6i_csi_capture_link_validate(struct media_link *link)
{}

static const struct media_entity_operations sun6i_csi_capture_media_ops =;

/* Capture */

int sun6i_csi_capture_setup(struct sun6i_csi_device *csi_dev)
{}

void sun6i_csi_capture_cleanup(struct sun6i_csi_device *csi_dev)
{}