diff mbox series

drm: panel-orientation-quirks: Add quirk for Lenovo Ideapad D330

Message ID CAD4j4=CGTF__Abvf94oBjJyS_VJpxvbLDV3WqXo+VUEo6wdw6w@mail.gmail.com (mailing list archive)
State New, archived
Headers show
Series drm: panel-orientation-quirks: Add quirk for Lenovo Ideapad D330 | expand

Commit Message

David Santamaría Rogado Jan. 3, 2019, 8:40 p.m. UTC
Lenovo Ideapad D330 Pentium CPU version has 1920x1200 LCD. Console
ouput gets rotated at boot as Miix 310.

Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

  { /* Acer One 10 (S1003) */
  .matches = {
@@ -148,6 +154,13 @@ static const struct dmi_system_id orientation_data[] = {
   DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
  },
  .driver_data = (void *)&lcd800x1280_rightside_up,
+ }, { /* Lenovo Ideapad D330 */
+ .matches = {
+  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "81H3"),
+  DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"),
+ },
+ .driver_data = (void *)&lcd1200x1920_rightside_up,
  }, { /* VIOS LTH17 */
  .matches = {
   DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),

Comments

David Santamaría Rogado Jan. 21, 2019, 1:12 a.m. UTC | #1
There are also 1280x800 versions of the Ideapad D330. I don't know the
dmi strings for the lower versions, but they could be equal between
versions of the same model.

Could be possible to add orientation_data matrix elements with the
same dmi strings and different driver data to complain both
resolutions?

If I or someone could get dmi strings from one of these models I can
write patch v2.

If someone can review this and explain the situation of two
resolutions in the same model, would be great.

Is needed to provide a way to verify the dmi strings?

El jue., 3 ene. 2019 a las 21:40, David Santamaría Rogado
(<howl.nsp@gmail.com>) escribió:
>
> Lenovo Ideapad D330 Pentium CPU version has 1920x1200 LCD. Console
> ouput gets rotated at boot as Miix 310.
>
> Signed-off-by: David Santamaría Rogado <howl.nsp@gmail.com>
> ---
>  drivers/gpu/drm/drm_panel_orientation_quirks.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c
> b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> index 52e445bb1aa58..521aff99b08a6 100644
> --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
> +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> @@ -80,6 +80,12 @@ static const struct drm_dmi_panel_orientation_data
> lcd800x1280_rightside_up = {
>   .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
>  };
>
> +static const struct drm_dmi_panel_orientation_data
> lcd1200x1920_rightside_up = {
> + .width = 1200,
> + .height = 1920,
> + .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
> +};
> +
>  static const struct dmi_system_id orientation_data[] = {
>   { /* Acer One 10 (S1003) */
>   .matches = {
> @@ -148,6 +154,13 @@ static const struct dmi_system_id orientation_data[] = {
>    DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
>   },
>   .driver_data = (void *)&lcd800x1280_rightside_up,
> + }, { /* Lenovo Ideapad D330 */
> + .matches = {
> +  DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"),
> +  DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "81H3"),
> +  DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"),
> + },
> + .driver_data = (void *)&lcd1200x1920_rightside_up,
>   }, { /* VIOS LTH17 */
>   .matches = {
>    DMI_EXACT_MATCH(DMI_SYS_VENDOR, "VIOS"),
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 52e445bb1aa58..521aff99b08a6 100644
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
@@ -80,6 +80,12 @@  static const struct drm_dmi_panel_orientation_data
lcd800x1280_rightside_up = {
  .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
 };

+static const struct drm_dmi_panel_orientation_data
lcd1200x1920_rightside_up = {
+ .width = 1200,
+ .height = 1920,
+ .orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
+};
+
 static const struct dmi_system_id orientation_data[] = {