treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / media / platform / mtk-vcodec / vdec_drv_base.h
blobceb4db4cb3bed8bc896da985b8b7cc193814e5c2
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 "mtk_vcodec_drv.h"
12 #include "vdec_drv_if.h"
14 struct vdec_common_if {
15 /**
16 * (*init)() - initialize decode driver
17 * @ctx : [in] mtk v4l2 context
18 * @h_vdec : [out] driver handle
20 int (*init)(struct mtk_vcodec_ctx *ctx);
22 /**
23 * (*decode)() - trigger decode
24 * @h_vdec : [in] driver handle
25 * @bs : [in] input bitstream
26 * @fb : [in] frame buffer to store decoded frame
27 * @res_chg : [out] resolution change happen
29 int (*decode)(void *h_vdec, struct mtk_vcodec_mem *bs,
30 struct vdec_fb *fb, bool *res_chg);
32 /**
33 * (*get_param)() - get driver's parameter
34 * @h_vdec : [in] driver handle
35 * @type : [in] input parameter type
36 * @out : [out] buffer to store query result
38 int (*get_param)(void *h_vdec, enum vdec_get_param_type type,
39 void *out);
41 /**
42 * (*deinit)() - deinitialize driver.
43 * @h_vdec : [in] driver handle to be deinit
45 void (*deinit)(void *h_vdec);
48 #endif