#include <media/videobuf2-v4l2.h>
#include <media/videobuf2-dma-contig.h>
#include <media/v4l2-event.h>
#include <media/v4l2-mem2mem.h>
#include <linux/module.h>
#include "mtk_vcodec_dec.h"
#include "mtk_vcodec_dec_pm.h"
#include "vdec_drv_if.h"
struct mtk_stateless_control { … };
static const struct mtk_stateless_control mtk_stateless_controls[] = …;
#define NUM_CTRLS …
static struct mtk_video_fmt mtk_video_formats[9];
static struct mtk_video_fmt default_out_format;
static struct mtk_video_fmt default_cap_format;
static unsigned int num_formats;
static const struct v4l2_frmsize_stepwise stepwise_fhd = …;
static void mtk_vdec_stateless_cap_to_disp(struct mtk_vcodec_dec_ctx *ctx, int error,
struct media_request *src_buf_req)
{ … }
static struct vdec_fb *vdec_get_cap_buffer(struct mtk_vcodec_dec_ctx *ctx)
{ … }
static void vb2ops_vdec_buf_request_complete(struct vb2_buffer *vb)
{ … }
static void mtk_vdec_worker(struct work_struct *work)
{ … }
static void vb2ops_vdec_stateless_buf_queue(struct vb2_buffer *vb)
{ … }
static int mtk_vdec_flush_decoder(struct mtk_vcodec_dec_ctx *ctx)
{ … }
static int mtk_vcodec_get_pic_info(struct mtk_vcodec_dec_ctx *ctx)
{ … }
static int mtk_vdec_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static const struct v4l2_ctrl_ops mtk_vcodec_dec_ctrl_ops = …;
static void mtk_vcodec_dec_fill_h264_level(struct v4l2_ctrl_config *cfg,
struct mtk_vcodec_dec_ctx *ctx)
{ … }
static void mtk_vcodec_dec_fill_h264_profile(struct v4l2_ctrl_config *cfg,
struct mtk_vcodec_dec_ctx *ctx)
{ … }
static void mtk_vcodec_dec_fill_h265_level(struct v4l2_ctrl_config *cfg,
struct mtk_vcodec_dec_ctx *ctx)
{ … }
static void mtk_vcodec_dec_fill_h265_profile(struct v4l2_ctrl_config *cfg,
struct mtk_vcodec_dec_ctx *ctx)
{ … }
static void mtk_vcodec_dec_fill_vp9_level(struct v4l2_ctrl_config *cfg,
struct mtk_vcodec_dec_ctx *ctx)
{ … }
static void mtk_vcodec_dec_fill_vp9_profile(struct v4l2_ctrl_config *cfg,
struct mtk_vcodec_dec_ctx *ctx)
{ … }
static void mtk_vcodec_dec_reset_controls(struct v4l2_ctrl_config *cfg,
struct mtk_vcodec_dec_ctx *ctx)
{ … }
static int mtk_vcodec_dec_ctrls_setup(struct mtk_vcodec_dec_ctx *ctx)
{ … }
static int fops_media_request_validate(struct media_request *mreq)
{ … }
const struct media_device_ops mtk_vcodec_media_ops = …;
static void mtk_vcodec_add_formats(unsigned int fourcc,
struct mtk_vcodec_dec_ctx *ctx)
{ … }
static void mtk_vcodec_get_supported_formats(struct mtk_vcodec_dec_ctx *ctx)
{ … }
static void mtk_init_vdec_params(struct mtk_vcodec_dec_ctx *ctx)
{ … }
static int vb2ops_vdec_out_buf_validate(struct vb2_buffer *vb)
{ … }
static struct vb2_ops mtk_vdec_request_vb2_ops = …;
const struct mtk_vcodec_dec_pdata mtk_vdec_8183_pdata = …;
const struct mtk_vcodec_dec_pdata mtk_lat_sig_core_pdata = …;
const struct mtk_vcodec_dec_pdata mtk_vdec_single_core_pdata = …;