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
56 uint32_t vpu_inst_addr
;
60 * struct mdp_ipi_comm_ack - for VPU_MDP_DEINIT_ACK, VPU_MDP_PROCESS_ACK
61 * @msg_id : VPU_MDP_DEINIT_ACK, VPU_MDP_PROCESS_ACK
63 * @ap_inst : AP mtk_mdp_vpu address
64 * @vpu_inst_addr : VPU MDP instance address
65 * @status : VPU exeuction result
67 struct mdp_ipi_comm_ack
{
71 uint32_t vpu_inst_addr
;
76 * struct mdp_config - configured for source/destination image
81 * @w_stride : bytes in horizontal
82 * @h_stride : bytes in vertical
83 * @crop_x : cropped left
84 * @crop_y : cropped top
85 * @crop_w : cropped width
86 * @crop_h : cropped height
87 * @format : color format
104 uint64_t addr_mva
[MTK_MDP_MAX_NUM_PLANE
];
105 int32_t plane_size
[MTK_MDP_MAX_NUM_PLANE
];
109 struct mdp_config_misc
{
110 int32_t orientation
; /* 0, 90, 180, 270 */
111 int32_t hflip
; /* 1 will enable the flip */
112 int32_t vflip
; /* 1 will enable the flip */
113 int32_t alpha
; /* global alpha */
116 struct mdp_process_vsi
{
117 struct mdp_config src_config
;
118 struct mdp_buffer src_buffer
;
119 struct mdp_config dst_config
;
120 struct mdp_buffer dst_buffer
;
121 struct mdp_config_misc misc
;
126 #endif /* __MTK_MDP_IPI_H__ */