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

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2021 MediaTek Inc.
 * Author: Yunfei Dong <[email protected]>
 */

#include <linux/freezer.h>
#include <linux/interrupt.h>
#include <linux/kthread.h>

#include "mtk_vcodec_dec_drv.h"
#include "mtk_vcodec_dec_pm.h"
#include "vdec_msg_queue.h"

#define VDEC_MSG_QUEUE_TIMEOUT_MS

/* the size used to store lat slice header information */
#define VDEC_LAT_SLICE_HEADER_SZ

/* the size used to store avc error information */
#define VDEC_ERR_MAP_SZ_AVC

#define VDEC_RD_MV_BUFFER_SZ
#define VDEC_LAT_TILE_SZ

/* core will read the trans buffer which decoded by lat to decode again.
 * The trans buffer size of FHD and 4K bitstreams are different.
 */
static int vde_msg_queue_get_trans_size(int width, int height)
{}

void vdec_msg_queue_init_ctx(struct vdec_msg_queue_ctx *ctx, int hardware_index)
{}

static struct list_head *vdec_get_buf_list(int hardware_index, struct vdec_lat_buf *buf)
{}

static void vdec_msg_queue_inc(struct vdec_msg_queue *msg_queue, int hardware_index)
{}

static void vdec_msg_queue_dec(struct vdec_msg_queue *msg_queue, int hardware_index)
{}

int vdec_msg_queue_qbuf(struct vdec_msg_queue_ctx *msg_ctx, struct vdec_lat_buf *buf)
{}

static bool vdec_msg_queue_wait_event(struct vdec_msg_queue_ctx *msg_ctx)
{}

struct vdec_lat_buf *vdec_msg_queue_dqbuf(struct vdec_msg_queue_ctx *msg_ctx)
{}

void vdec_msg_queue_update_ube_rptr(struct vdec_msg_queue *msg_queue, uint64_t ube_rptr)
{}

void vdec_msg_queue_update_ube_wptr(struct vdec_msg_queue *msg_queue, uint64_t ube_wptr)
{}

bool vdec_msg_queue_wait_lat_buf_full(struct vdec_msg_queue *msg_queue)
{}

void vdec_msg_queue_deinit(struct vdec_msg_queue *msg_queue,
			   struct mtk_vcodec_dec_ctx *ctx)
{}

static void vdec_msg_queue_core_work(struct work_struct *work)
{}

int vdec_msg_queue_init(struct vdec_msg_queue *msg_queue,
			struct mtk_vcodec_dec_ctx *ctx, core_decode_cb_t core_decode,
			int private_size)
{}