xref: /linux/drivers/media/platform/mediatek/mdp3/mtk-mdp3-type.h (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (c) 2023 MediaTek Inc.
4  * Author: Ping-Hsun Wu <ping-hsun.wu@mediatek.com>
5  */
6 
7 #ifndef __MTK_MDP3_TYPE_H__
8 #define __MTK_MDP3_TYPE_H__
9 
10 #include <linux/types.h>
11 
12 #define IMG_MAX_HW_INPUTS	3
13 #define IMG_MAX_HW_OUTPUTS	4
14 #define IMG_MAX_PLANES		3
15 #define IMG_MAX_COMPONENTS	20
16 
17 struct img_crop {
18 	s32 left;
19 	s32 top;
20 	u32 width;
21 	u32 height;
22 	u32 left_subpix;
23 	u32 top_subpix;
24 	u32 width_subpix;
25 	u32 height_subpix;
26 } __packed;
27 
28 struct img_region {
29 	s32 left;
30 	s32 right;
31 	s32 top;
32 	s32 bottom;
33 } __packed;
34 
35 struct img_offset {
36 	s32 left;
37 	s32 top;
38 	u32 left_subpix;
39 	u32 top_subpix;
40 } __packed;
41 
42 struct img_mux {
43 	u32 reg;
44 	u32 value;
45 	u32 subsys_id;
46 } __packed;
47 
48 struct img_mmsys_ctrl {
49 	struct img_mux sets[IMG_MAX_COMPONENTS * 2];
50 	u32 num_sets;
51 } __packed;
52 
53 #endif  /* __MTK_MDP3_TYPE_H__ */
54