1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2016 MediaTek Inc.
4 * Author: PC Chen <pc.chen@mediatek.com>
7 #ifndef _VDEC_IPI_MSG_H_
8 #define _VDEC_IPI_MSG_H_
11 * enum vdec_ipi_msgid - message id between AP and VPU
12 * @AP_IPIMSG_XXX : AP to VPU cmd message id
13 * @VPU_IPIMSG_XXX_ACK : VPU ack AP cmd message id
16 AP_IPIMSG_DEC_INIT = 0xA000,
17 AP_IPIMSG_DEC_START = 0xA001,
18 AP_IPIMSG_DEC_END = 0xA002,
19 AP_IPIMSG_DEC_DEINIT = 0xA003,
20 AP_IPIMSG_DEC_RESET = 0xA004,
22 VPU_IPIMSG_DEC_INIT_ACK = 0xB000,
23 VPU_IPIMSG_DEC_START_ACK = 0xB001,
24 VPU_IPIMSG_DEC_END_ACK = 0xB002,
25 VPU_IPIMSG_DEC_DEINIT_ACK = 0xB003,
26 VPU_IPIMSG_DEC_RESET_ACK = 0xB004,
30 * struct vdec_ap_ipi_cmd - generic AP to VPU ipi command format
31 * @msg_id : vdec_ipi_msgid
32 * @vpu_inst_addr : VPU decoder instance address
34 struct vdec_ap_ipi_cmd {
36 uint32_t vpu_inst_addr;
40 * struct vdec_vpu_ipi_ack - generic VPU to AP ipi command format
41 * @msg_id : vdec_ipi_msgid
42 * @status : VPU exeuction result
43 * @ap_inst_addr : AP video decoder instance address
45 struct vdec_vpu_ipi_ack {
48 uint64_t ap_inst_addr;
52 * struct vdec_ap_ipi_init - for AP_IPIMSG_DEC_INIT
53 * @msg_id : AP_IPIMSG_DEC_INIT
54 * @reserved : Reserved field
55 * @ap_inst_addr : AP video decoder instance address
57 struct vdec_ap_ipi_init {
60 uint64_t ap_inst_addr;
64 * struct vdec_ap_ipi_dec_start - for AP_IPIMSG_DEC_START
65 * @msg_id : AP_IPIMSG_DEC_START
66 * @vpu_inst_addr : VPU decoder instance address
68 * H264 decoder [0]:buf_sz [1]:nal_start
69 * VP8 decoder [0]:width/height
70 * VP9 decoder [0]:profile, [1][2] width/height
71 * @reserved : Reserved field
73 struct vdec_ap_ipi_dec_start {
75 uint32_t vpu_inst_addr;
81 * struct vdec_vpu_ipi_init_ack - for VPU_IPIMSG_DEC_INIT_ACK
82 * @msg_id : VPU_IPIMSG_DEC_INIT_ACK
83 * @status : VPU exeuction result
84 * @ap_inst_addr : AP vcodec_vpu_inst instance address
85 * @vpu_inst_addr : VPU decoder instance address
87 struct vdec_vpu_ipi_init_ack {
90 uint64_t ap_inst_addr;
91 uint32_t vpu_inst_addr;