Skip to content

Instantly share code, notes, and snippets.

@sagebind
Created June 23, 2019 05:14
Show Gist options
  • Save sagebind/5f385f9588fd2ade7f97e02435f16bde to your computer and use it in GitHub Desktop.
Save sagebind/5f385f9588fd2ade7f97e02435f16bde to your computer and use it in GitHub Desktop.
GPD MicroPC production panel orientation patch
diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
index d8a0bcd02..11468bcf3 100644
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
@@ -42,7 +42,7 @@ 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 = {
+static const struct drm_dmi_panel_orientation_data gpd_micropc_preproduction = {
.width = 720,
.height = 1280,
.bios_dates = (const char * const []){ "04/26/2019",
@@ -50,6 +50,12 @@ static const struct drm_dmi_panel_orientation_data gpd_micropc = {
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
};
+static const struct drm_dmi_panel_orientation_data gpd_micropc = {
+ .width = 720,
+ .height = 1280,
+ .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
+};
+
static const struct drm_dmi_panel_orientation_data gpd_pocket = {
.width = 1200,
.height = 1920,
@@ -115,13 +121,21 @@ 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) */
+ }, { /* GPD MicroPC (pre-production, 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_preproduction,
+ }, { /* GPD MicroPC (production) */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MicroPC"),
+ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment