2 * Copyright (c) 2015-2016 MediaTek Inc.
3 * Author: Houlong Wei <houlong.wei@mediatek.com>
4 * Ming Hsiu Tsai <minghsiu.tsai@mediatek.com>
6 * This program is free software; you can redistribute it and/or modify
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 __MTK_MDP_IPI_H__
17 #define __MTK_MDP_IPI_H__
19 #define MTK_MDP_MAX_NUM_PLANE 3
23 AP_MDP_DEINIT = 0xd001,
24 AP_MDP_PROCESS = 0xd002,
26 VPU_MDP_INIT_ACK = 0xe000,
27 VPU_MDP_DEINIT_ACK = 0xe001,
28 VPU_MDP_PROCESS_ACK = 0xe002
34 * struct mdp_ipi_init - for AP_MDP_INIT
35 * @msg_id : AP_MDP_INIT
37 * @ap_inst : AP mtk_mdp_vpu address
46 * struct mdp_ipi_comm - for AP_MDP_PROCESS, AP_MDP_DEINIT
47 * @msg_id : AP_MDP_PROCESS, AP_MDP_DEINIT
49 * @ap_inst : AP mtk_mdp_vpu address
50 * @vpu_inst_addr : VPU MDP instance address
51 * @padding : Alignment padding
57 uint32_t vpu_inst_addr;
62 * struct mdp_ipi_comm_ack - for VPU_MDP_DEINIT_ACK, VPU_MDP_PROCESS_ACK
63 * @msg_id : VPU_MDP_DEINIT_ACK, VPU_MDP_PROCESS_ACK
65 * @ap_inst : AP mtk_mdp_vpu address
66 * @vpu_inst_addr : VPU MDP instance address
67 * @status : VPU exeuction result
69 struct mdp_ipi_comm_ack {
73 uint32_t vpu_inst_addr;
78 * struct mdp_config - configured for source/destination image
83 * @w_stride : bytes in horizontal
84 * @h_stride : bytes in vertical
85 * @crop_x : cropped left
86 * @crop_y : cropped top
87 * @crop_w : cropped width
88 * @crop_h : cropped height
89 * @format : color format
106 uint64_t addr_mva[MTK_MDP_MAX_NUM_PLANE];
107 int32_t plane_size[MTK_MDP_MAX_NUM_PLANE];
111 struct mdp_config_misc {
112 int32_t orientation; /* 0, 90, 180, 270 */
113 int32_t hflip; /* 1 will enable the flip */
114 int32_t vflip; /* 1 will enable the flip */
115 int32_t alpha; /* global alpha */
118 struct mdp_process_vsi {
119 struct mdp_config src_config;
120 struct mdp_buffer src_buffer;
121 struct mdp_config dst_config;
122 struct mdp_buffer dst_buffer;
123 struct mdp_config_misc misc;
128 #endif /* __MTK_MDP_IPI_H__ */