#include <linux/pm_runtime.h>
#include <media/videobuf2-dma-contig.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include <media/v4l2-mem2mem.h>
#include "cedrus.h"
#include "cedrus_video.h"
#include "cedrus_dec.h"
#include "cedrus_hw.h"
#define CEDRUS_DECODE_SRC …
#define CEDRUS_DECODE_DST …
#define CEDRUS_MIN_WIDTH …
#define CEDRUS_MIN_HEIGHT …
#define CEDRUS_MAX_WIDTH …
#define CEDRUS_MAX_HEIGHT …
static struct cedrus_format cedrus_formats[] = …;
#define CEDRUS_FORMATS_COUNT …
static inline struct cedrus_ctx *cedrus_file2ctx(struct file *file)
{ … }
static struct cedrus_format *cedrus_find_format(struct cedrus_ctx *ctx,
u32 pixelformat, u32 directions)
{ … }
void cedrus_prepare_format(struct v4l2_pix_format *pix_fmt)
{ … }
static int cedrus_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{ … }
static int cedrus_enum_fmt(struct file *file, struct v4l2_fmtdesc *f,
u32 direction)
{ … }
static int cedrus_enum_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int cedrus_enum_fmt_vid_out(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int cedrus_g_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int cedrus_g_fmt_vid_out(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int cedrus_try_fmt_vid_cap_p(struct cedrus_ctx *ctx,
struct v4l2_pix_format *pix_fmt)
{ … }
static int cedrus_try_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int cedrus_try_fmt_vid_out_p(struct cedrus_ctx *ctx,
struct v4l2_pix_format *pix_fmt)
{ … }
static int cedrus_try_fmt_vid_out(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int cedrus_s_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
void cedrus_reset_cap_format(struct cedrus_ctx *ctx)
{ … }
static int cedrus_s_fmt_vid_out_p(struct cedrus_ctx *ctx,
struct v4l2_pix_format *pix_fmt)
{ … }
void cedrus_reset_out_format(struct cedrus_ctx *ctx)
{ … }
static int cedrus_s_fmt_vid_out(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
const struct v4l2_ioctl_ops cedrus_ioctl_ops = …;
static int cedrus_queue_setup(struct vb2_queue *vq, unsigned int *nbufs,
unsigned int *nplanes, unsigned int sizes[],
struct device *alloc_devs[])
{ … }
static void cedrus_queue_cleanup(struct vb2_queue *vq, u32 state)
{ … }
static int cedrus_buf_out_validate(struct vb2_buffer *vb)
{ … }
static int cedrus_buf_prepare(struct vb2_buffer *vb)
{ … }
static int cedrus_start_streaming(struct vb2_queue *vq, unsigned int count)
{ … }
static void cedrus_stop_streaming(struct vb2_queue *vq)
{ … }
static void cedrus_buf_queue(struct vb2_buffer *vb)
{ … }
static void cedrus_buf_request_complete(struct vb2_buffer *vb)
{ … }
static const struct vb2_ops cedrus_qops = …;
int cedrus_queue_init(void *priv, struct vb2_queue *src_vq,
struct vb2_queue *dst_vq)
{ … }