linux/drivers/staging/media/sunxi/cedrus/cedrus.h

/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Cedrus VPU driver
 *
 * Copyright (C) 2016 Florent Revest <[email protected]>
 * Copyright (C) 2018 Paul Kocialkowski <[email protected]>
 * Copyright (C) 2018 Bootlin
 *
 * Based on the vim2m driver, that is:
 *
 * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
 * Pawel Osciak, <[email protected]>
 * Marek Szyprowski, <[email protected]>
 */

#ifndef _CEDRUS_H_
#define _CEDRUS_H_

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

#include <linux/iopoll.h>
#include <linux/platform_device.h>
#include <linux/workqueue.h>

#define CEDRUS_NAME

#define CEDRUS_CAPABILITY_UNTILED
#define CEDRUS_CAPABILITY_H265_DEC
#define CEDRUS_CAPABILITY_H264_DEC
#define CEDRUS_CAPABILITY_MPEG2_DEC
#define CEDRUS_CAPABILITY_VP8_DEC
#define CEDRUS_CAPABILITY_H265_10_DEC

enum cedrus_irq_status {};

enum cedrus_h264_pic_type {};

struct cedrus_control {};

struct cedrus_h264_run {};

struct cedrus_mpeg2_run {};

struct cedrus_h265_run {};

struct cedrus_vp8_run {};

struct cedrus_run {};

struct cedrus_buffer {};

struct cedrus_ctx {};

struct cedrus_dec_ops {};

struct cedrus_variant {};

struct cedrus_dev {};

extern struct cedrus_dec_ops cedrus_dec_ops_mpeg2;
extern struct cedrus_dec_ops cedrus_dec_ops_h264;
extern struct cedrus_dec_ops cedrus_dec_ops_h265;
extern struct cedrus_dec_ops cedrus_dec_ops_vp8;

static inline void cedrus_write(struct cedrus_dev *dev, u32 reg, u32 val)
{}

static inline u32 cedrus_read(struct cedrus_dev *dev, u32 reg)
{}

static inline u32 cedrus_wait_for(struct cedrus_dev *dev, u32 reg, u32 flag)
{}

static inline dma_addr_t cedrus_buf_addr(struct vb2_buffer *buf,
					 struct v4l2_pix_format *pix_fmt,
					 unsigned int plane)
{}

static inline dma_addr_t cedrus_dst_buf_addr(struct cedrus_ctx *ctx,
					     struct vb2_buffer *buf,
					     unsigned int plane)
{}

static inline void cedrus_write_ref_buf_addr(struct cedrus_ctx *ctx,
					     struct vb2_queue *q,
					     u64 timestamp,
					     u32 luma_reg,
					     u32 chroma_reg)
{}

static inline struct cedrus_buffer *
vb2_v4l2_to_cedrus_buffer(const struct vb2_v4l2_buffer *p)
{}

static inline struct cedrus_buffer *
vb2_to_cedrus_buffer(const struct vb2_buffer *p)
{}

static inline bool
cedrus_is_capable(struct cedrus_ctx *ctx, unsigned int capabilities)
{}

void *cedrus_find_control_data(struct cedrus_ctx *ctx, u32 id);
u32 cedrus_get_num_of_controls(struct cedrus_ctx *ctx, u32 id);

#endif