diff mbox series

[2/2] drm: panel-orientation-quirks: Add quirk for GPD win2

Message ID 20180909133457.10636-3-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series drm: Make i915 check for panel orient quirks on eDP and add one such quirk | expand

Commit Message

Hans de Goede Sept. 9, 2018, 1:34 p.m. UTC
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_win2 data struct may very well need to be updated
with some extra bios-dates in the future.

Reported-and-tested-by: russianneuromancer@ya.ru
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Jani Nikula Sept. 25, 2018, 8:30 a.m. UTC | #1
On Sun, 09 Sep 2018, Hans de Goede <j.w.r.degoede@gmail.com> wrote:
> 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_win2 data struct may very well need to be updated
> with some extra bios-dates in the future.
>
> Reported-and-tested-by: russianneuromancer@ya.ru
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

FWIW,

Acked-by: Jani Nikula <jani.nikula@intel.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 fe9c6c731e87..280a41d33081 100644
> --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
> +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> @@ -53,6 +53,14 @@ static const struct drm_dmi_panel_orientation_data gpd_win = {
>  	.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
>  };
>  
> +static const struct drm_dmi_panel_orientation_data gpd_win2 = {
> +	.width = 720,
> +	.height = 1280,
> +	.bios_dates = (const char * const []){
> +		"12/07/2017", "05/24/2018", NULL },
> +	.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
> +};
> +
>  static const struct drm_dmi_panel_orientation_data itworks_tw891 = {
>  	.width = 800,
>  	.height = 1280,
> @@ -94,6 +102,14 @@ static const struct dmi_system_id orientation_data[] = {
>  		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
>  		},
>  		.driver_data = (void *)&gpd_win,
> +	}, {	/* GPD Win 2 (too 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_win2,
>  	}, {	/* I.T.Works TW891 */
>  		.matches = {
>  		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
index fe9c6c731e87..280a41d33081 100644
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
@@ -53,6 +53,14 @@  static const struct drm_dmi_panel_orientation_data gpd_win = {
 	.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
 };
 
+static const struct drm_dmi_panel_orientation_data gpd_win2 = {
+	.width = 720,
+	.height = 1280,
+	.bios_dates = (const char * const []){
+		"12/07/2017", "05/24/2018", NULL },
+	.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
+};
+
 static const struct drm_dmi_panel_orientation_data itworks_tw891 = {
 	.width = 800,
 	.height = 1280,
@@ -94,6 +102,14 @@  static const struct dmi_system_id orientation_data[] = {
 		  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
 		},
 		.driver_data = (void *)&gpd_win,
+	}, {	/* GPD Win 2 (too 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_win2,
 	}, {	/* I.T.Works TW891 */
 		.matches = {
 		  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."),