/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2016 MediaTek Inc. * Author: PC Chen <[email protected]> */ #ifndef _VDEC_IPI_MSG_H_ #define _VDEC_IPI_MSG_H_ /* * enum vdec_ipi_msgid - message id between AP and VPU * @AP_IPIMSG_XXX : AP to VPU cmd message id * @VPU_IPIMSG_XXX_ACK : VPU ack AP cmd message id */ enum vdec_ipi_msgid { … }; /** * struct vdec_ap_ipi_cmd - generic AP to VPU ipi command format * @msg_id : vdec_ipi_msgid * @vpu_inst_addr : VPU decoder instance address. Used if ABI version < 2. * @inst_id : instance ID. Used if the ABI version >= 2. * @codec_type : codec fourcc * @reserved : reserved param */ struct vdec_ap_ipi_cmd { … }; /** * struct vdec_vpu_ipi_ack - generic VPU to AP ipi command format * @msg_id : vdec_ipi_msgid * @status : VPU exeuction result * @ap_inst_addr : AP video decoder instance address */ struct vdec_vpu_ipi_ack { … }; /** * struct vdec_ap_ipi_init - for AP_IPIMSG_DEC_INIT * @msg_id : AP_IPIMSG_DEC_INIT * @codec_type : codec fourcc * @ap_inst_addr : AP video decoder instance address */ struct vdec_ap_ipi_init { … }; /** * struct vdec_ap_ipi_dec_start - for AP_IPIMSG_DEC_START * @msg_id : AP_IPIMSG_DEC_START * @vpu_inst_addr : VPU decoder instance address. Used if ABI version < 2. * @inst_id : instance ID. Used if the ABI version >= 2. * @data : Header info * H264 decoder [0]:buf_sz [1]:nal_start * VP8 decoder [0]:width/height * VP9 decoder [0]:profile, [1][2] width/height * @codec_type : codec fourcc */ struct vdec_ap_ipi_dec_start { … }; /** * struct vdec_vpu_ipi_init_ack - for VPU_IPIMSG_DEC_INIT_ACK * @msg_id : VPU_IPIMSG_DEC_INIT_ACK * @status : VPU exeuction result * @ap_inst_addr : AP vcodec_vpu_inst instance address * @vpu_inst_addr : VPU decoder instance address * @vdec_abi_version: ABI version of the firmware. Kernel can use it to * ensure that it is compatible with the firmware. * This field is not valid for MT8173 and must not be * accessed for this chip. * @inst_id : instance ID. Valid only if the ABI version >= 2. */ struct vdec_vpu_ipi_init_ack { … }; /** * struct vdec_ap_ipi_get_param - for AP_IPIMSG_DEC_GET_PARAM * @msg_id : AP_IPIMSG_DEC_GET_PARAM * @inst_id : instance ID. Used if the ABI version >= 2. * @data : picture information * @param_type : get param type * @codec_type : Codec fourcc */ struct vdec_ap_ipi_get_param { … }; /** * struct vdec_vpu_ipi_get_param_ack - for VPU_IPIMSG_DEC_GET_PARAM_ACK * @msg_id : VPU_IPIMSG_DEC_GET_PARAM_ACK * @status : VPU execution result * @ap_inst_addr : AP vcodec_vpu_inst instance address * @data : picture information from SCP. * @param_type : get param type * @reserved : reserved param */ struct vdec_vpu_ipi_get_param_ack { … }; #endif