linux/drivers/media/platform/nxp/imx8-isi/imx8-isi-pipe.c

// SPDX-License-Identifier: GPL-2.0
/*
 * V4L2 Capture ISI subdev driver for i.MX8QXP/QM platform
 *
 * ISI is a Image Sensor Interface of i.MX8QXP/QM platform, which
 * used to process image from camera sensor to memory or DC
 *
 * Copyright (c) 2019 NXP Semiconductor
 */

#include <linux/device.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/minmax.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/types.h>
#include <linux/videodev2.h>

#include <media/media-entity.h>
#include <media/v4l2-subdev.h>
#include <media/videobuf2-v4l2.h>

#include "imx8-isi-core.h"
#include "imx8-isi-regs.h"

/*
 * While the ISI receives data from the gasket on a 3x12-bit bus, the pipeline
 * subdev conceptually includes the gasket in order to avoid exposing an extra
 * subdev between the CSIS and the ISI. We thus need to expose media bus codes
 * corresponding to the CSIS output, which is narrower.
 */
static const struct mxc_isi_bus_format_info mxc_isi_bus_formats[] =;

const struct mxc_isi_bus_format_info *
mxc_isi_bus_format_by_code(u32 code, unsigned int pad)
{}

const struct mxc_isi_bus_format_info *
mxc_isi_bus_format_by_index(unsigned int index, unsigned int pad)
{}

static inline struct mxc_isi_pipe *to_isi_pipe(struct v4l2_subdev *sd)
{}

int mxc_isi_pipe_enable(struct mxc_isi_pipe *pipe)
{}

void mxc_isi_pipe_disable(struct mxc_isi_pipe *pipe)
{}

/* -----------------------------------------------------------------------------
 * V4L2 subdev operations
 */

static struct v4l2_mbus_framefmt *
mxc_isi_pipe_get_pad_format(struct mxc_isi_pipe *pipe,
			    struct v4l2_subdev_state *state,
			    unsigned int pad)
{}

static struct v4l2_rect *
mxc_isi_pipe_get_pad_crop(struct mxc_isi_pipe *pipe,
			  struct v4l2_subdev_state *state,
			  unsigned int pad)
{}

static struct v4l2_rect *
mxc_isi_pipe_get_pad_compose(struct mxc_isi_pipe *pipe,
			     struct v4l2_subdev_state *state,
			     unsigned int pad)
{}

static int mxc_isi_pipe_init_state(struct v4l2_subdev *sd,
				   struct v4l2_subdev_state *state)
{}

static int mxc_isi_pipe_enum_mbus_code(struct v4l2_subdev *sd,
				       struct v4l2_subdev_state *state,
				       struct v4l2_subdev_mbus_code_enum *code)
{}

static int mxc_isi_pipe_set_fmt(struct v4l2_subdev *sd,
				struct v4l2_subdev_state *state,
				struct v4l2_subdev_format *fmt)
{}

static int mxc_isi_pipe_get_selection(struct v4l2_subdev *sd,
				      struct v4l2_subdev_state *state,
				      struct v4l2_subdev_selection *sel)
{}

static int mxc_isi_pipe_set_selection(struct v4l2_subdev *sd,
				      struct v4l2_subdev_state *state,
				      struct v4l2_subdev_selection *sel)
{}

static const struct v4l2_subdev_pad_ops mxc_isi_pipe_subdev_pad_ops =;

static const struct v4l2_subdev_ops mxc_isi_pipe_subdev_ops =;

static const struct v4l2_subdev_internal_ops mxc_isi_pipe_internal_ops =;

/* -----------------------------------------------------------------------------
 * IRQ handling
 */

static irqreturn_t mxc_isi_pipe_irq_handler(int irq, void *priv)
{}

/* -----------------------------------------------------------------------------
 * Init & cleanup
 */

static const struct media_entity_operations mxc_isi_pipe_entity_ops =;

int mxc_isi_pipe_init(struct mxc_isi_dev *isi, unsigned int id)
{}

void mxc_isi_pipe_cleanup(struct mxc_isi_pipe *pipe)
{}

int mxc_isi_pipe_acquire(struct mxc_isi_pipe *pipe,
			 mxc_isi_pipe_irq_t irq_handler)
{}

void mxc_isi_pipe_release(struct mxc_isi_pipe *pipe)
{}