mtk_vcodec_fw.h (1236B)
1/* SPDX-License-Identifier: GPL-2.0 */ 2 3#ifndef _MTK_VCODEC_FW_H_ 4#define _MTK_VCODEC_FW_H_ 5 6#include <linux/remoteproc.h> 7#include <linux/remoteproc/mtk_scp.h> 8 9#include "../vpu/mtk_vpu.h" 10 11struct mtk_vcodec_dev; 12 13enum mtk_vcodec_fw_type { 14 VPU, 15 SCP, 16}; 17 18enum mtk_vcodec_fw_use { 19 DECODER, 20 ENCODER, 21}; 22 23struct mtk_vcodec_fw; 24 25typedef void (*mtk_vcodec_ipi_handler) (void *data, 26 unsigned int len, void *priv); 27 28struct 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); 31void mtk_vcodec_fw_release(struct mtk_vcodec_fw *fw); 32 33int mtk_vcodec_fw_load_firmware(struct mtk_vcodec_fw *fw); 34unsigned int mtk_vcodec_fw_get_vdec_capa(struct mtk_vcodec_fw *fw); 35unsigned int mtk_vcodec_fw_get_venc_capa(struct mtk_vcodec_fw *fw); 36void *mtk_vcodec_fw_map_dm_addr(struct mtk_vcodec_fw *fw, u32 mem_addr); 37int mtk_vcodec_fw_ipi_register(struct mtk_vcodec_fw *fw, int id, 38 mtk_vcodec_ipi_handler handler, 39 const char *name, void *priv); 40int mtk_vcodec_fw_ipi_send(struct mtk_vcodec_fw *fw, int id, 41 void *buf, unsigned int len, unsigned int wait); 42int mtk_vcodec_fw_get_type(struct mtk_vcodec_fw *fw); 43 44#endif /* _MTK_VCODEC_FW_H_ */