Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / media / platform / mtk-vcodec / vdec_drv_base.h
blobe913f963b7dbc90922bcfe7f10be6030f1c01e8a
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (c) 2016 MediaTek Inc.
4 * Author: PC Chen <pc.chen@mediatek.com>
5 */
7 #ifndef _VDEC_DRV_BASE_
8 #define _VDEC_DRV_BASE_
10 #include "vdec_drv_if.h"
12 struct vdec_common_if {
13 /**
14 * (*init)() - initialize decode driver
15 * @ctx : [in] mtk v4l2 context
16 * @h_vdec : [out] driver handle
18 int (*init)(struct mtk_vcodec_ctx *ctx);
20 /**
21 * (*decode)() - trigger decode
22 * @h_vdec : [in] driver handle
23 * @bs : [in] input bitstream
24 * @fb : [in] frame buffer to store decoded frame
25 * @res_chg : [out] resolution change happen
27 int (*decode)(void *h_vdec, struct mtk_vcodec_mem *bs,
28 struct vdec_fb *fb, bool *res_chg);
30 /**
31 * (*get_param)() - get driver's parameter
32 * @h_vdec : [in] driver handle
33 * @type : [in] input parameter type
34 * @out : [out] buffer to store query result
36 int (*get_param)(void *h_vdec, enum vdec_get_param_type type,
37 void *out);
39 /**
40 * (*deinit)() - deinitialize driver.
41 * @h_vdec : [in] driver handle to be deinit
43 void (*deinit)(void *h_vdec);
46 #endif