1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2015-2016 MediaTek Inc.
4 * Author: Houlong Wei <houlong.wei@mediatek.com>
5 * Ming Hsiu Tsai <minghsiu.tsai@mediatek.com>
8 #ifndef __MTK_MDP_IPI_H__
9 #define __MTK_MDP_IPI_H__
11 #define MTK_MDP_MAX_NUM_PLANE 3
15 AP_MDP_DEINIT = 0xd001,
16 AP_MDP_PROCESS = 0xd002,
18 VPU_MDP_INIT_ACK = 0xe000,
19 VPU_MDP_DEINIT_ACK = 0xe001,
20 VPU_MDP_PROCESS_ACK = 0xe002
26 * struct mdp_ipi_init - for AP_MDP_INIT
27 * @msg_id : AP_MDP_INIT
29 * @ap_inst : AP mtk_mdp_vpu address
38 * struct mdp_ipi_comm - for AP_MDP_PROCESS, AP_MDP_DEINIT
39 * @msg_id : AP_MDP_PROCESS, AP_MDP_DEINIT
41 * @ap_inst : AP mtk_mdp_vpu address
42 * @vpu_inst_addr : VPU MDP instance address
43 * @padding : Alignment padding
49 uint32_t vpu_inst_addr;
54 * struct mdp_ipi_comm_ack - for VPU_MDP_DEINIT_ACK, VPU_MDP_PROCESS_ACK
55 * @msg_id : VPU_MDP_DEINIT_ACK, VPU_MDP_PROCESS_ACK
57 * @ap_inst : AP mtk_mdp_vpu address
58 * @vpu_inst_addr : VPU MDP instance address
59 * @status : VPU exeuction result
61 struct mdp_ipi_comm_ack {
65 uint32_t vpu_inst_addr;
70 * struct mdp_config - configured for source/destination image
75 * @w_stride : bytes in horizontal
76 * @h_stride : bytes in vertical
77 * @crop_x : cropped left
78 * @crop_y : cropped top
79 * @crop_w : cropped width
80 * @crop_h : cropped height
81 * @format : color format
98 uint64_t addr_mva[MTK_MDP_MAX_NUM_PLANE];
99 int32_t plane_size[MTK_MDP_MAX_NUM_PLANE];
103 struct mdp_config_misc {
104 int32_t orientation; /* 0, 90, 180, 270 */
105 int32_t hflip; /* 1 will enable the flip */
106 int32_t vflip; /* 1 will enable the flip */
107 int32_t alpha; /* global alpha */
110 struct mdp_process_vsi {
111 struct mdp_config src_config;
112 struct mdp_buffer src_buffer;
113 struct mdp_config dst_config;
114 struct mdp_buffer dst_buffer;
115 struct mdp_config_misc misc;
120 #endif /* __MTK_MDP_IPI_H__ */