162 lines
6.3 KiB
Diff
162 lines
6.3 KiB
Diff
From 0dfd69f0ef79517b722c36000b20c64a6263519d Mon Sep 17 00:00:00 2001
|
|
From: Hans de Goede <hdegoede@redhat.com>
|
|
Date: Tue, 21 May 2019 17:02:15 +0200
|
|
Subject: [PATCH 1/2] drm: panel-orientation-quirks: Add quirk for GPD pocket2
|
|
|
|
GPD has done it again, make a nice device (good), use way too generic
|
|
DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly).
|
|
|
|
Because of the too generic DMI strings this entry is also doing bios-date
|
|
matching, so the gpd_pocket2 data struct may very well need to be updated
|
|
with some extra bios-dates in the future.
|
|
|
|
Changes in v2:
|
|
-Add one more known BIOS date to the list of BIOS dates
|
|
|
|
Cc: Jurgen Kramer <gtmkramer@xs4all.nl>
|
|
Reported-by: Jurgen Kramer <gtmkramer@xs4all.nl>
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
---
|
|
drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 ++++++++++++++++
|
|
1 file changed, 16 insertions(+)
|
|
|
|
diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
|
|
index 521aff99b08a..98679c831f66 100644
|
|
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
|
|
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
|
|
@@ -50,6 +50,14 @@ static const struct drm_dmi_panel_orientation_data gpd_pocket = {
|
|
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
|
};
|
|
|
|
+static const struct drm_dmi_panel_orientation_data gpd_pocket2 = {
|
|
+ .width = 1200,
|
|
+ .height = 1920,
|
|
+ .bios_dates = (const char * const []){ "06/28/2018", "08/28/2018",
|
|
+ "12/07/2018", NULL },
|
|
+ .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
|
+};
|
|
+
|
|
static const struct drm_dmi_panel_orientation_data gpd_win = {
|
|
.width = 720,
|
|
.height = 1280,
|
|
@@ -112,6 +120,14 @@ static const struct dmi_system_id orientation_data[] = {
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
|
|
},
|
|
.driver_data = (void *)&gpd_pocket,
|
|
+ }, { /* GPD Pocket 2 (generic strings, also match on bios date) */
|
|
+ .matches = {
|
|
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
|
|
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
|
|
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"),
|
|
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
|
|
+ },
|
|
+ .driver_data = (void *)&gpd_pocket2,
|
|
}, { /* GPD Win (same note on DMI match as GPD Pocket) */
|
|
.matches = {
|
|
DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"),
|
|
--
|
|
2.21.0
|
|
|
|
From de2393a0d476c441c7afb4e5df1c31e53aef2cbc Mon Sep 17 00:00:00 2001
|
|
From: Hans de Goede <hdegoede@redhat.com>
|
|
Date: Thu, 23 May 2019 12:09:29 +0200
|
|
Subject: [PATCH 2/2] drm: panel-orientation-quirks: Add quirk for GPD MicroPC
|
|
|
|
GPD has done it again, make a nice device (good), use way too generic
|
|
DMI strings (bad) and use a portrait screen rotated 90 degrees (ugly).
|
|
|
|
Because of the too generic DMI strings this entry is also doing bios-date
|
|
matching, so the gpd_micropc data struct may very well need to be updated
|
|
with some extra bios-dates in the future.
|
|
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
---
|
|
drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 ++++++++++++++++
|
|
1 file changed, 16 insertions(+)
|
|
|
|
diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
|
|
index 98679c831f66..d8a0bcd02f34 100644
|
|
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
|
|
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
|
|
@@ -42,6 +42,14 @@ static const struct drm_dmi_panel_orientation_data asus_t100ha = {
|
|
.orientation = DRM_MODE_PANEL_ORIENTATION_LEFT_UP,
|
|
};
|
|
|
|
+static const struct drm_dmi_panel_orientation_data gpd_micropc = {
|
|
+ .width = 720,
|
|
+ .height = 1280,
|
|
+ .bios_dates = (const char * const []){ "04/26/2019",
|
|
+ NULL },
|
|
+ .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
|
+};
|
|
+
|
|
static const struct drm_dmi_panel_orientation_data gpd_pocket = {
|
|
.width = 1200,
|
|
.height = 1920,
|
|
@@ -107,6 +115,14 @@ static const struct dmi_system_id orientation_data[] = {
|
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
|
|
},
|
|
.driver_data = (void *)&asus_t100ha,
|
|
+ }, { /* GPD MicroPC (generic strings, also match on bios date) */
|
|
+ .matches = {
|
|
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
|
|
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
|
|
+ DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Default string"),
|
|
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
|
|
+ },
|
|
+ .driver_data = (void *)&gpd_micropc,
|
|
}, { /*
|
|
* GPD Pocket, note that the the DMI data is less generic then
|
|
* it seems, devices with a board-vendor of "AMI Corporation"
|
|
--
|
|
2.21.0
|
|
|
|
From aab65520447cb19e3be4a301b796dfb588e85873 Mon Sep 17 00:00:00 2001
|
|
From: Hans de Goede <hdegoede@redhat.com>
|
|
Date: Sun, 2 Jun 2019 15:20:33 +0200
|
|
Subject: [PATCH] drm: panel-orientation-quirks: Add extra quirk table entry
|
|
for GPD MicroPC
|
|
|
|
Newer GPD MicroPC BIOS versions have proper DMI strings, add an extra quirk
|
|
table entry for these new strings. This is good news, as this means that we
|
|
no longer have to update the BIOS dates list with every BIOS update.
|
|
|
|
Fixes: 652b8b086538("drm: panel-orientation-quirks: Add quirk for GPD MicroPC")
|
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
---
|
|
drivers/gpu/drm/drm_panel_orientation_quirks.c | 12 ++++++++++++
|
|
1 file changed, 12 insertions(+)
|
|
|
|
diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
|
|
index d8a0bcd02f34..ffd95bfeaa94 100644
|
|
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
|
|
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
|
|
@@ -90,6 +90,12 @@ static const struct drm_dmi_panel_orientation_data itworks_tw891 = {
|
|
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
|
};
|
|
|
|
+static const struct drm_dmi_panel_orientation_data lcd720x1280_rightside_up = {
|
|
+ .width = 720,
|
|
+ .height = 1280,
|
|
+ .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
|
+};
|
|
+
|
|
static const struct drm_dmi_panel_orientation_data lcd800x1280_rightside_up = {
|
|
.width = 800,
|
|
.height = 1280,
|
|
@@ -123,6 +129,12 @@ static const struct dmi_system_id orientation_data[] = {
|
|
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
|
|
},
|
|
.driver_data = (void *)&gpd_micropc,
|
|
+ }, { /* GPD MicroPC (later BIOS versions with proper DMI strings) */
|
|
+ .matches = {
|
|
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"),
|
|
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MicroPC"),
|
|
+ },
|
|
+ .driver_data = (void *)&lcd720x1280_rightside_up,
|
|
}, { /*
|
|
* GPD Pocket, note that the the DMI data is less generic then
|
|
* it seems, devices with a board-vendor of "AMI Corporation"
|
|
--
|
|
2.21.0
|
|
|