1 /* SPDX-License-Identifier: GPL-2.0 */
3 #ifndef _MTK_VCODEC_FW_H_
4 #define _MTK_VCODEC_FW_H_
6 #include <linux/remoteproc.h>
7 #include <linux/remoteproc/mtk_scp.h>
9 #include "../mtk-vpu/mtk_vpu.h"
11 struct mtk_vcodec_dev
;
13 enum mtk_vcodec_fw_type
{
18 enum mtk_vcodec_fw_use
{
25 typedef void (*mtk_vcodec_ipi_handler
) (void *data
,
26 unsigned int len
, void *priv
);
28 struct mtk_vcodec_fw
*mtk_vcodec_fw_select(struct mtk_vcodec_dev
*dev
,
29 enum mtk_vcodec_fw_type type
,
30 enum mtk_vcodec_fw_use fw_use
);
31 void mtk_vcodec_fw_release(struct mtk_vcodec_fw
*fw
);
33 int mtk_vcodec_fw_load_firmware(struct mtk_vcodec_fw
*fw
);
34 unsigned int mtk_vcodec_fw_get_vdec_capa(struct mtk_vcodec_fw
*fw
);
35 unsigned int mtk_vcodec_fw_get_venc_capa(struct mtk_vcodec_fw
*fw
);
36 void *mtk_vcodec_fw_map_dm_addr(struct mtk_vcodec_fw
*fw
, u32 mem_addr
);
37 int mtk_vcodec_fw_ipi_register(struct mtk_vcodec_fw
*fw
, int id
,
38 mtk_vcodec_ipi_handler handler
,
39 const char *name
, void *priv
);
40 int mtk_vcodec_fw_ipi_send(struct mtk_vcodec_fw
*fw
, int id
,
41 void *buf
, unsigned int len
, unsigned int wait
);
43 #endif /* _MTK_VCODEC_FW_H_ */