linux/drivers/staging/media/ipu3/ipu3.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (C) 2018 Intel Corporation */

#ifndef __IPU3_H
#define __IPU3_H

#include <linux/iova.h>
#include <linux/pci.h>

#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/videobuf2-dma-sg.h>

#include "ipu3-css.h"

#define IMGU_NAME

/*
 * The semantics of the driver is that whenever there is a buffer available in
 * master queue, the driver queues a buffer also to all other active nodes.
 * If user space hasn't provided a buffer to all other video nodes first,
 * the driver gets an internal dummy buffer and queues it.
 */
#define IMGU_QUEUE_MASTER
#define IMGU_QUEUE_FIRST_INPUT
#define IMGU_MAX_QUEUE_DEPTH

#define IMGU_NODE_IN
#define IMGU_NODE_PARAMS
#define IMGU_NODE_OUT
#define IMGU_NODE_VF
#define IMGU_NODE_STAT_3A
#define IMGU_NODE_NUM

#define file_to_intel_imgu_node(__file)

#define IPU3_INPUT_MIN_WIDTH
#define IPU3_INPUT_MIN_HEIGHT
#define IPU3_INPUT_MAX_WIDTH
#define IPU3_INPUT_MAX_HEIGHT
#define IPU3_OUTPUT_MIN_WIDTH
#define IPU3_OUTPUT_MIN_HEIGHT
#define IPU3_OUTPUT_MAX_WIDTH
#define IPU3_OUTPUT_MAX_HEIGHT

struct imgu_vb2_buffer {};

struct imgu_buffer {};

struct imgu_node_mapping {};

struct imgu_video_device {};

struct imgu_v4l2_subdev {};

struct imgu_media_pipe {};

/*
 * imgu_device -- ImgU (Imaging Unit) driver
 */
struct imgu_device {};

unsigned int imgu_node_to_queue(unsigned int node);
unsigned int imgu_map_node(struct imgu_device *imgu, unsigned int css_queue);
int imgu_queue_buffers(struct imgu_device *imgu, bool initial,
		       unsigned int pipe);

int imgu_v4l2_register(struct imgu_device *dev);
int imgu_v4l2_unregister(struct imgu_device *dev);
void imgu_v4l2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state);

int imgu_s_stream(struct imgu_device *imgu, int enable);

static inline u32 imgu_bytesperline(const unsigned int width,
				    enum imgu_abi_frame_format frame_format)
{}

#endif