2 * Copyright (c) 2016 MediaTek Inc.
3 * Author: PC Chen <pc.chen@mediatek.com>
5 * This program is free software; you can redistribute it and/or
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #ifndef _VDEC_IPI_MSG_H_
17 #define _VDEC_IPI_MSG_H_
20 * enum vdec_ipi_msgid - message id between AP and VPU
21 * @AP_IPIMSG_XXX : AP to VPU cmd message id
22 * @VPU_IPIMSG_XXX_ACK : VPU ack AP cmd message id
25 AP_IPIMSG_DEC_INIT
= 0xA000,
26 AP_IPIMSG_DEC_START
= 0xA001,
27 AP_IPIMSG_DEC_END
= 0xA002,
28 AP_IPIMSG_DEC_DEINIT
= 0xA003,
29 AP_IPIMSG_DEC_RESET
= 0xA004,
31 VPU_IPIMSG_DEC_INIT_ACK
= 0xB000,
32 VPU_IPIMSG_DEC_START_ACK
= 0xB001,
33 VPU_IPIMSG_DEC_END_ACK
= 0xB002,
34 VPU_IPIMSG_DEC_DEINIT_ACK
= 0xB003,
35 VPU_IPIMSG_DEC_RESET_ACK
= 0xB004,
39 * struct vdec_ap_ipi_cmd - generic AP to VPU ipi command format
40 * @msg_id : vdec_ipi_msgid
41 * @vpu_inst_addr : VPU decoder instance address
43 struct vdec_ap_ipi_cmd
{
45 uint32_t vpu_inst_addr
;
49 * struct vdec_vpu_ipi_ack - generic VPU to AP ipi command format
50 * @msg_id : vdec_ipi_msgid
51 * @status : VPU exeuction result
52 * @ap_inst_addr : AP video decoder instance address
54 struct vdec_vpu_ipi_ack
{
57 uint64_t ap_inst_addr
;
61 * struct vdec_ap_ipi_init - for AP_IPIMSG_DEC_INIT
62 * @msg_id : AP_IPIMSG_DEC_INIT
63 * @reserved : Reserved field
64 * @ap_inst_addr : AP video decoder instance address
66 struct vdec_ap_ipi_init
{
69 uint64_t ap_inst_addr
;
73 * struct vdec_ap_ipi_dec_start - for AP_IPIMSG_DEC_START
74 * @msg_id : AP_IPIMSG_DEC_START
75 * @vpu_inst_addr : VPU decoder instance address
77 * H264 decoder [0]:buf_sz [1]:nal_start
78 * VP8 decoder [0]:width/height
79 * VP9 decoder [0]:profile, [1][2] width/height
80 * @reserved : Reserved field
82 struct vdec_ap_ipi_dec_start
{
84 uint32_t vpu_inst_addr
;
90 * struct vdec_vpu_ipi_init_ack - for VPU_IPIMSG_DEC_INIT_ACK
91 * @msg_id : VPU_IPIMSG_DEC_INIT_ACK
92 * @status : VPU exeuction result
93 * @ap_inst_addr : AP vcodec_vpu_inst instance address
94 * @vpu_inst_addr : VPU decoder instance address
96 struct vdec_vpu_ipi_init_ack
{
99 uint64_t ap_inst_addr
;
100 uint32_t vpu_inst_addr
;