linux/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2016 MediaTek Inc.
 * Author: PC Chen <[email protected]>
 *         Tiffany Lin <[email protected]>
 */

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

#include "mtk_vcodec_dec_drv.h"
#include "mtk_vcodec_dec.h"
#include "vdec_drv_if.h"
#include "mtk_vcodec_dec_pm.h"

#define DFT_CFG_WIDTH
#define DFT_CFG_HEIGHT

static const struct mtk_video_fmt *
mtk_vdec_find_format(struct v4l2_format *f,
		     const struct mtk_vcodec_dec_pdata *dec_pdata)
{}

static bool mtk_vdec_get_cap_fmt(struct mtk_vcodec_dec_ctx *ctx, int format_index)
{}

static struct mtk_q_data *mtk_vdec_get_q_data(struct mtk_vcodec_dec_ctx *ctx,
					      enum v4l2_buf_type type)
{}

static int stateful_try_decoder_cmd(struct file *file, void *priv, struct v4l2_decoder_cmd *cmd)
{}

static int stateful_decoder_cmd(struct file *file, void *priv, struct v4l2_decoder_cmd *cmd)
{}

static int stateless_try_decoder_cmd(struct file *file, void *priv, struct v4l2_decoder_cmd *cmd)
{}

static int stateless_decoder_cmd(struct file *file, void *priv, struct v4l2_decoder_cmd *cmd)
{}

static int vidioc_try_decoder_cmd(struct file *file, void *priv, struct v4l2_decoder_cmd *cmd)
{}

static int vidioc_decoder_cmd(struct file *file, void *priv, struct v4l2_decoder_cmd *cmd)
{}

void mtk_vdec_unlock(struct mtk_vcodec_dec_ctx *ctx)
{}

void mtk_vdec_lock(struct mtk_vcodec_dec_ctx *ctx)
{}

void mtk_vcodec_dec_release(struct mtk_vcodec_dec_ctx *ctx)
{}

void mtk_vcodec_dec_set_default_params(struct mtk_vcodec_dec_ctx *ctx)
{}

static int vidioc_vdec_qbuf(struct file *file, void *priv,
			    struct v4l2_buffer *buf)
{}

static int vidioc_vdec_dqbuf(struct file *file, void *priv,
			     struct v4l2_buffer *buf)
{}

static int vidioc_vdec_querycap(struct file *file, void *priv,
				struct v4l2_capability *cap)
{}

static int vidioc_vdec_subscribe_evt(struct v4l2_fh *fh,
				     const struct v4l2_event_subscription *sub)
{}

static int vidioc_try_fmt(struct mtk_vcodec_dec_ctx *ctx, struct v4l2_format *f,
			  const struct mtk_video_fmt *fmt)
{}

static int vidioc_try_fmt_vid_cap_mplane(struct file *file, void *priv,
				struct v4l2_format *f)
{}

static int vidioc_try_fmt_vid_out_mplane(struct file *file, void *priv,
				struct v4l2_format *f)
{}

static int vidioc_vdec_g_selection(struct file *file, void *priv,
			struct v4l2_selection *s)
{}

static int vidioc_vdec_s_selection(struct file *file, void *priv,
				struct v4l2_selection *s)
{}

static int vidioc_vdec_s_fmt(struct file *file, void *priv,
			     struct v4l2_format *f)
{}

static int vidioc_enum_framesizes(struct file *file, void *priv,
				struct v4l2_frmsizeenum *fsize)
{}

static int vidioc_enum_fmt(struct v4l2_fmtdesc *f, void *priv,
			   bool output_queue)
{}

static int vidioc_vdec_enum_fmt_vid_cap(struct file *file, void *priv,
					struct v4l2_fmtdesc *f)
{}

static int vidioc_vdec_enum_fmt_vid_out(struct file *file, void *priv,
					struct v4l2_fmtdesc *f)
{}

static int vidioc_vdec_g_fmt(struct file *file, void *priv,
			     struct v4l2_format *f)
{}

int vb2ops_vdec_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
			    unsigned int *nplanes, unsigned int sizes[],
			    struct device *alloc_devs[])
{}

int vb2ops_vdec_buf_prepare(struct vb2_buffer *vb)
{}

void vb2ops_vdec_buf_finish(struct vb2_buffer *vb)
{}

int vb2ops_vdec_buf_init(struct vb2_buffer *vb)
{}

int vb2ops_vdec_start_streaming(struct vb2_queue *q, unsigned int count)
{}

void vb2ops_vdec_stop_streaming(struct vb2_queue *q)
{}

static void m2mops_vdec_device_run(void *priv)
{}

static int m2mops_vdec_job_ready(void *m2m_priv)
{}

static void m2mops_vdec_job_abort(void *priv)
{}

const struct v4l2_m2m_ops mtk_vdec_m2m_ops =;

const struct v4l2_ioctl_ops mtk_vdec_ioctl_ops =;

int mtk_vcodec_dec_queue_init(void *priv, struct vb2_queue *src_vq,
			   struct vb2_queue *dst_vq)
{}