forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/drm_panel_orientation_quirks.c
....@@ -69,10 +69,25 @@
6969 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
7070 };
7171
72
+static const struct drm_dmi_panel_orientation_data gpd_win2 = {
73
+ .width = 720,
74
+ .height = 1280,
75
+ .bios_dates = (const char * const []){
76
+ "12/07/2017", "05/24/2018", "06/29/2018", NULL },
77
+ .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
78
+};
79
+
7280 static const struct drm_dmi_panel_orientation_data itworks_tw891 = {
7381 .width = 800,
7482 .height = 1280,
7583 .bios_dates = (const char * const []){ "10/16/2015", NULL },
84
+ .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
85
+};
86
+
87
+static const struct drm_dmi_panel_orientation_data onegx1_pro = {
88
+ .width = 1200,
89
+ .height = 1920,
90
+ .bios_dates = (const char * const []){ "12/17/2020", NULL },
7691 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
7792 };
7893
....@@ -88,6 +103,24 @@
88103 .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
89104 };
90105
106
+static const struct drm_dmi_panel_orientation_data lcd1200x1920_rightside_up = {
107
+ .width = 1200,
108
+ .height = 1920,
109
+ .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
110
+};
111
+
112
+static const struct drm_dmi_panel_orientation_data lcd1280x1920_rightside_up = {
113
+ .width = 1280,
114
+ .height = 1920,
115
+ .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
116
+};
117
+
118
+static const struct drm_dmi_panel_orientation_data lcd1600x2560_leftside_up = {
119
+ .width = 1600,
120
+ .height = 2560,
121
+ .orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP,
122
+};
123
+
91124 static const struct dmi_system_id orientation_data[] = {
92125 { /* Acer One 10 (S1003) */
93126 .matches = {
....@@ -95,6 +128,18 @@
95128 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "One S1003"),
96129 },
97130 .driver_data = (void *)&lcd800x1280_rightside_up,
131
+ }, { /* Acer Switch V 10 (SW5-017) */
132
+ .matches = {
133
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),
134
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "SW5-017"),
135
+ },
136
+ .driver_data = (void *)&lcd800x1280_rightside_up,
137
+ }, { /* Anbernic Win600 */
138
+ .matches = {
139
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Anbernic"),
140
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Win600"),
141
+ },
142
+ .driver_data = (void *)&lcd720x1280_rightside_up,
98143 }, { /* Asus T100HA */
99144 .matches = {
100145 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
....@@ -133,6 +178,12 @@
133178 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MicroPC"),
134179 },
135180 .driver_data = (void *)&lcd720x1280_rightside_up,
181
+ }, { /* GPD Win Max */
182
+ .matches = {
183
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"),
184
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1619-01"),
185
+ },
186
+ .driver_data = (void *)&lcd800x1280_rightside_up,
136187 }, { /*
137188 * GPD Pocket, note that the the DMI data is less generic then
138189 * it seems, devices with a board-vendor of "AMI Corporation"
....@@ -162,6 +213,20 @@
162213 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
163214 },
164215 .driver_data = (void *)&gpd_win,
216
+ }, { /* GPD Win 2 (too generic strings, also match on bios date) */
217
+ .matches = {
218
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
219
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
220
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"),
221
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
222
+ },
223
+ .driver_data = (void *)&gpd_win2,
224
+ }, { /* GPD Win 3 */
225
+ .matches = {
226
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"),
227
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "G1618-03")
228
+ },
229
+ .driver_data = (void *)&lcd720x1280_rightside_up,
165230 }, { /* I.T.Works TW891 */
166231 .matches = {
167232 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
....@@ -195,6 +260,69 @@
195260 DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
196261 },
197262 .driver_data = (void *)&lcd800x1280_rightside_up,
263
+ }, { /* Lenovo Ideapad D330-10IGM (HD) */
264
+ .matches = {
265
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
266
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"),
267
+ },
268
+ .driver_data = (void *)&lcd800x1280_rightside_up,
269
+ }, { /* Lenovo Ideapad D330-10IGM (FHD) */
270
+ .matches = {
271
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
272
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"),
273
+ },
274
+ .driver_data = (void *)&lcd1200x1920_rightside_up,
275
+ }, { /* Lenovo Ideapad D330-10IGL (HD) */
276
+ .matches = {
277
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
278
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGL"),
279
+ },
280
+ .driver_data = (void *)&lcd800x1280_rightside_up,
281
+ }, { /* Lenovo IdeaPad Duet 3 10IGL5 */
282
+ .matches = {
283
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
284
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Duet 3 10IGL5"),
285
+ },
286
+ .driver_data = (void *)&lcd1200x1920_rightside_up,
287
+ }, { /* Lenovo Yoga Book X90F / X90L */
288
+ .matches = {
289
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
290
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
291
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
292
+ },
293
+ .driver_data = (void *)&lcd1200x1920_rightside_up,
294
+ }, { /* Lenovo Yoga Book X91F / X91L */
295
+ .matches = {
296
+ /* Non exact match to match F + L versions */
297
+ DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X91"),
298
+ },
299
+ .driver_data = (void *)&lcd1200x1920_rightside_up,
300
+ }, { /* OneGX1 Pro */
301
+ .matches = {
302
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "SYSTEM_MANUFACTURER"),
303
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "SYSTEM_PRODUCT_NAME"),
304
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Default string"),
305
+ },
306
+ .driver_data = (void *)&onegx1_pro,
307
+ }, { /* OneXPlayer */
308
+ .matches = {
309
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ONE-NETBOOK TECHNOLOGY CO., LTD."),
310
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "ONE XPLAYER"),
311
+ },
312
+ .driver_data = (void *)&lcd1600x2560_leftside_up,
313
+ }, { /* Samsung GalaxyBook 10.6 */
314
+ .matches = {
315
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
316
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Galaxy Book 10.6"),
317
+ },
318
+ .driver_data = (void *)&lcd1280x1920_rightside_up,
319
+ }, { /* Valve Steam Deck */
320
+ .matches = {
321
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Valve"),
322
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Jupiter"),
323
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "1"),
324
+ },
325
+ .driver_data = (void *)&lcd800x1280_rightside_up,
198326 }, { /* VIOS LTH17 */
199327 .matches = {
200328 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),