xref: /linux/drivers/gpu/drm/amd/include/displayobject.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /****************************************************************************\
2 *
3 *  Module Name    displayobjectsoc15.h
4 *  Project
5 *  Device
6 *
7 *  Description    Contains the common definitions for display objects for SoC15 products.
8 *
9 *  Copyright 2014 Advanced Micro Devices, Inc.
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
12 * and associated documentation files (the "Software"), to deal in the Software without restriction,
13 * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
15 * subject to the following conditions:
16 *
17 * The above copyright notice and this permission notice shall be included in all copies or substantial
18 * portions of the Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
23 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
24 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
25 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 * OTHER DEALINGS IN THE SOFTWARE.
27 *
28 \****************************************************************************/
29 #ifndef _DISPLAY_OBJECT_SOC15_H_
30 #define _DISPLAY_OBJECT_SOC15_H_
31 
32 #if defined(_X86_)
33 #pragma pack(1)
34 #endif
35 
36 
37 /****************************************************
38 * Display Object Type Definition
39 *****************************************************/
40 enum display_object_type{
41 DISPLAY_OBJECT_TYPE_NONE						=0x00,
42 DISPLAY_OBJECT_TYPE_GPU							=0x01,
43 DISPLAY_OBJECT_TYPE_ENCODER						=0x02,
44 DISPLAY_OBJECT_TYPE_CONNECTOR					=0x03
45 };
46 
47 /****************************************************
48 * Encorder Object Type Definition
49 *****************************************************/
50 enum encoder_object_type{
51 ENCODER_OBJECT_ID_NONE							 =0x00,
52 ENCODER_OBJECT_ID_INTERNAL_UNIPHY				 =0x01,
53 ENCODER_OBJECT_ID_INTERNAL_UNIPHY1				 =0x02,
54 ENCODER_OBJECT_ID_INTERNAL_UNIPHY2				 =0x03,
55 };
56 
57 
58 /****************************************************
59 * Connector Object ID Definition
60 *****************************************************/
61 
62 enum connector_object_type{
63 CONNECTOR_OBJECT_ID_NONE						  =0x00,
64 CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D			  =0x01,
65 CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D				  =0x02,
66 CONNECTOR_OBJECT_ID_HDMI_TYPE_A					  =0x03,
67 CONNECTOR_OBJECT_ID_LVDS						  =0x04,
68 CONNECTOR_OBJECT_ID_DISPLAYPORT					  =0x05,
69 CONNECTOR_OBJECT_ID_eDP							  =0x06,
70 CONNECTOR_OBJECT_ID_OPM							  =0x07
71 };
72 
73 
74 /****************************************************
75 * Protection Object ID Definition
76 *****************************************************/
77 //No need
78 
79 /****************************************************
80 *  Object ENUM ID Definition
81 *****************************************************/
82 
83 enum object_enum_id{
84 OBJECT_ENUM_ID1									  =0x01,
85 OBJECT_ENUM_ID2									  =0x02,
86 OBJECT_ENUM_ID3									  =0x03,
87 OBJECT_ENUM_ID4									  =0x04,
88 OBJECT_ENUM_ID5									  =0x05,
89 OBJECT_ENUM_ID6									  =0x06
90 };
91 
92 /****************************************************
93 *Object ID Bit definition
94 *****************************************************/
95 enum object_id_bit{
96 OBJECT_ID_MASK									  =0x00FF,
97 ENUM_ID_MASK									  =0x0F00,
98 OBJECT_TYPE_MASK								  =0xF000,
99 OBJECT_ID_SHIFT									  =0x00,
100 ENUM_ID_SHIFT									  =0x08,
101 OBJECT_TYPE_SHIFT								  =0x0C
102 };
103 
104 
105 /****************************************************
106 * GPU Object definition - Shared with BIOS
107 *****************************************************/
108 enum gpu_objet_def{
109 GPU_ENUM_ID1                            =( DISPLAY_OBJECT_TYPE_GPU << OBJECT_TYPE_SHIFT | OBJECT_ENUM_ID1 << ENUM_ID_SHIFT)
110 };
111 
112 /****************************************************
113 * Encoder Object definition - Shared with BIOS
114 *****************************************************/
115 
116 enum encoder_objet_def{
117 ENCODER_INTERNAL_UNIPHY_ENUM_ID1         =( DISPLAY_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
118                                                  OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
119                                                  ENCODER_OBJECT_ID_INTERNAL_UNIPHY << OBJECT_ID_SHIFT),
120 
121 ENCODER_INTERNAL_UNIPHY_ENUM_ID2         =( DISPLAY_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
122                                                  OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
123                                                  ENCODER_OBJECT_ID_INTERNAL_UNIPHY << OBJECT_ID_SHIFT),
124 
125 ENCODER_INTERNAL_UNIPHY1_ENUM_ID1        =( DISPLAY_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
126                                                  OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
127                                                  ENCODER_OBJECT_ID_INTERNAL_UNIPHY1 << OBJECT_ID_SHIFT),
128 
129 ENCODER_INTERNAL_UNIPHY1_ENUM_ID2        =( DISPLAY_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
130                                                  OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
131                                                  ENCODER_OBJECT_ID_INTERNAL_UNIPHY1 << OBJECT_ID_SHIFT),
132 
133 ENCODER_INTERNAL_UNIPHY2_ENUM_ID1        =( DISPLAY_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
134                                                  OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
135                                                  ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 << OBJECT_ID_SHIFT),
136 
137 ENCODER_INTERNAL_UNIPHY2_ENUM_ID2        =( DISPLAY_OBJECT_TYPE_ENCODER << OBJECT_TYPE_SHIFT |\
138                                                  OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
139                                                  ENCODER_OBJECT_ID_INTERNAL_UNIPHY2 << OBJECT_ID_SHIFT)
140 };
141 
142 
143 /****************************************************
144 * Connector Object definition - Shared with BIOS
145 *****************************************************/
146 
147 
148 enum connector_objet_def{
149 CONNECTOR_LVDS_ENUM_ID1							=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
150                                                  OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
151                                                  CONNECTOR_OBJECT_ID_LVDS << OBJECT_ID_SHIFT),
152 
153 
154 CONNECTOR_eDP_ENUM_ID1							=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
155                                                  OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
156                                                  CONNECTOR_OBJECT_ID_eDP << OBJECT_ID_SHIFT),
157 
158 CONNECTOR_SINGLE_LINK_DVI_D_ENUM_ID1			=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
159                                                  OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
160                                                  CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D << OBJECT_ID_SHIFT),
161 
162 CONNECTOR_SINGLE_LINK_DVI_D_ENUM_ID2			=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
163                                                  OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
164                                                  CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_D << OBJECT_ID_SHIFT),
165 
166 
167 CONNECTOR_DUAL_LINK_DVI_D_ENUM_ID1				=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
168                                                  OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
169                                                  CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D << OBJECT_ID_SHIFT),
170 
171 CONNECTOR_DUAL_LINK_DVI_D_ENUM_ID2				=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
172                                                  OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
173                                                  CONNECTOR_OBJECT_ID_DUAL_LINK_DVI_D << OBJECT_ID_SHIFT),
174 
175 CONNECTOR_HDMI_TYPE_A_ENUM_ID1					=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
176                                                  OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
177                                                  CONNECTOR_OBJECT_ID_HDMI_TYPE_A << OBJECT_ID_SHIFT),
178 
179 CONNECTOR_HDMI_TYPE_A_ENUM_ID2					=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
180                                                  OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
181                                                  CONNECTOR_OBJECT_ID_HDMI_TYPE_A << OBJECT_ID_SHIFT),
182 
183 CONNECTOR_DISPLAYPORT_ENUM_ID1					=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
184                                                  OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
185                                                  CONNECTOR_OBJECT_ID_DISPLAYPORT << OBJECT_ID_SHIFT),
186 
187 CONNECTOR_DISPLAYPORT_ENUM_ID2					=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
188                                                  OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
189                                                  CONNECTOR_OBJECT_ID_DISPLAYPORT << OBJECT_ID_SHIFT),
190 
191 CONNECTOR_DISPLAYPORT_ENUM_ID3					=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
192                                                  OBJECT_ENUM_ID3 << ENUM_ID_SHIFT |\
193                                                  CONNECTOR_OBJECT_ID_DISPLAYPORT << OBJECT_ID_SHIFT),
194 
195 CONNECTOR_DISPLAYPORT_ENUM_ID4					=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
196                                                  OBJECT_ENUM_ID4 << ENUM_ID_SHIFT |\
197                                                  CONNECTOR_OBJECT_ID_DISPLAYPORT << OBJECT_ID_SHIFT),
198 
199 CONNECTOR_OPM_ENUM_ID1							=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
200                                                  OBJECT_ENUM_ID1 << ENUM_ID_SHIFT |\
201                                                  CONNECTOR_OBJECT_ID_OPM << OBJECT_ID_SHIFT),          //Mapping to MXM_DP_A
202 
203 CONNECTOR_OPM_ENUM_ID2							=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
204                                                  OBJECT_ENUM_ID2 << ENUM_ID_SHIFT |\
205                                                  CONNECTOR_OBJECT_ID_OPM << OBJECT_ID_SHIFT),          //Mapping to MXM_DP_B
206 
207 CONNECTOR_OPM_ENUM_ID3							=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
208                                                  OBJECT_ENUM_ID3 << ENUM_ID_SHIFT |\
209                                                  CONNECTOR_OBJECT_ID_OPM << OBJECT_ID_SHIFT),          //Mapping to MXM_DP_C
210 
211 CONNECTOR_OPM_ENUM_ID4							=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
212                                                  OBJECT_ENUM_ID4 << ENUM_ID_SHIFT |\
213                                                  CONNECTOR_OBJECT_ID_OPM << OBJECT_ID_SHIFT),          //Mapping to MXM_DP_D
214 
215 CONNECTOR_OPM_ENUM_ID5							=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
216                                                  OBJECT_ENUM_ID5 << ENUM_ID_SHIFT |\
217                                                  CONNECTOR_OBJECT_ID_OPM << OBJECT_ID_SHIFT),          //Mapping to MXM_LVDS_TXxx
218 
219 
220 CONNECTOR_OPM_ENUM_ID6							=( DISPLAY_OBJECT_TYPE_CONNECTOR << OBJECT_TYPE_SHIFT |\
221                                                  OBJECT_ENUM_ID6 << ENUM_ID_SHIFT |\
222                                                  CONNECTOR_OBJECT_ID_OPM << OBJECT_ID_SHIFT)         //Mapping to MXM_LVDS_TXxx
223 };
224 
225 /****************************************************
226 * Router Object ID definition - Shared with BIOS
227 *****************************************************/
228 //No Need, in future we ever need, we can define a record in atomfirwareSoC15.h associated with an object that has this router
229 
230 
231 /****************************************************
232 * PROTECTION Object ID definition - Shared with BIOS
233 *****************************************************/
234 //No need,in future we ever need, all display path are capable of protection now.
235 
236 /****************************************************
237 * Generic Object ID definition - Shared with BIOS
238 *****************************************************/
239 //No need, in future we ever need like GLsync, we can define a record in atomfirwareSoC15.h associated with an object.
240 
241 
242 #if defined(_X86_)
243 #pragma pack()
244 #endif
245 
246 #endif
247 
248 
249 
250