Skip to contentSkip to conversation

drm: Make i915 check for panel orient quirks on eDP and add one such quirk

PATCH In review Hans de Goede 4 participants 10 messages Sep 9, 2018 – Sep 25, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover drm: Make i915 check for panel orient quirks on eDP and add one such quirk

Hi All,

This series fixes (works around) the gpd win 2's eDP panel being a portait mode panel being used in a landscape case (clamshell model).

I plan to merge the i915 bit through dinq and the actual quirk through drm-misc. These 2 are related in the sense that the quirk will not do anything without the i915 bits and the i915 bits only actually do anything once at least 1 quirk entry for an eDP panel is present. But they can be merged independently.

Regards,

Hans

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#1 lore raw

PATCH 1/2 drm/i915: Check for panel orientation quirks on eDP panels

So far we have only been calling drm_connector_init_panel_orientation_property(), which checks for panel orientation quirks in the drm_panel_orientation_quirks.c file, for DSI panels as so far only devices with DSI panels have had panels which are not mounted up right.

The new GPD win2 device uses a portrait screen in a landscape case, so now we've a device with an eDP panel which needs the panel-orientation property to let the fbcon code and userspace know that the image needs to be fixed-up.

This commit makes intel_edp_init_connector() call drm_connector_init_panel_orientation_property() so that the property gets added.

Reported-and-tested-by [email protected]
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/intel_dp.c +4 -0
index 436c22de33b6..4f0b3c8f3f8c 100644
@@ -6490,6 +6490,10 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
 	intel_connector->panel.backlight.power = intel_edp_backlight_power;
 	intel_panel_setup_backlight(connector, pipe);
 
+	if (fixed_mode)
+		drm_connector_init_panel_orientation_property(
+			connector, fixed_mode->hdisplay, fixed_mode->vdisplay);
+
 	return true;
 
 out_vdd_off:
Signature · 6 lines
2.19.0.rc0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] drm/i915: Check for panel orientation quirks on eDP panels

Quoted 11 lines · Hans de Goede

So far we have only been calling drm_connector_init_panel_orientation_property(), which checks for panel orientation quirks in the drm_panel_orientation_quirks.c file, for DSI panels as so far only devices with DSI panels have had panels which are not mounted up right.

The new GPD win2 device uses a portrait screen in a landscape case, so now we've a device with an eDP panel which needs the panel-orientation property to let the fbcon code and userspace know that the image needs to be fixed-up.

Quoted 6 lines

This commit makes intel_edp_init_connector() call drm_connector_init_panel_orientation_property() so that the property gets added.

Reported-and-tested-by [email protected]

Always saddened by every quirk...

Quoted 19 lines
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/intel_dp.c +4 -0
index 436c22de33b6..4f0b3c8f3f8c 100644
@@ -6490,6 +6490,10 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
 	intel_connector->panel.backlight.power = intel_edp_backlight_power;
 	intel_panel_setup_backlight(connector, pipe);
 
+	if (fixed_mode)
+		drm_connector_init_panel_orientation_property(
+			connector, fixed_mode->hdisplay, fixed_mode->vdisplay);
+
 	return true;
 
 out_vdd_off:
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

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

In reply to Hans de Goede

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 [email protected]
---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/gpu/drm/drm_panel_orientation_quirks.c +16 -0
index fe9c6c731e87..280a41d33081 100644
@@ -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."),
Signature · 6 lines
2.19.0.rc0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Acked-by on v1 2/2
#4 lore raw

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

Quoted 9 lines · Hans de Goede

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 [email protected]

FWIW,

Quoted 38 lines
---
 drivers/gpu/drm/drm_panel_orientation_quirks.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
drivers/gpu/drm/drm_panel_orientation_quirks.c +16 -0
index fe9c6c731e87..280a41d33081 100644
@@ -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."),
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw
In reply to Hans de Goede

Hi,

Quoted 10 lines · Hans de Goede

Hi All,

This series fixes (works around) the gpd win 2's eDP panel being a portait mode panel being used in a landscape case (clamshell model).

I plan to merge the i915 bit through dinq and the actual quirk through drm-misc. These 2 are related in the sense that the quirk will not do anything without the i915 bits and the i915 bits only actually do anything once at least 1 quirk entry for an eDP panel is present. But they can be merged independently.

Off-topic/meta:

I got a number of bounces for all the @linux.intel.com addresses, but according to MAINTAINERS those are still the one to use ?

Regards,

Hans
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

✗ Fi.CI.CHECKPATCH: warning for drm: Make i915 check for panel orient quirks on eDP and add one such quirk

In reply to Hans de Goede
== Series Details ==

== Series Details ==

Series: drm: Make i915 check for panel orient quirks on eDP and add one such quirk
URL : https://patchwork.freedesktop.org/series/49389/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
c514c6c8ea38 drm/i915: Check for panel orientation quirks on eDP panels
-:33: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#33: FILE: drivers/gpu/drm/i915/intel_dp.c:6494:
+		drm_connector_init_panel_orientation_property(

-:38: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Hans de Goede <[email protected]>'

total: 0 errors, 1 warnings, 1 checks, 10 lines checked
0efa0ba71ccd drm: panel-orientation-quirks: Add quirk for GPD win2
-:49: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Hans de Goede <[email protected]>'

total: 0 errors, 1 warnings, 0 checks, 28 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

✓ Fi.CI.BAT: success for drm: Make i915 check for panel orient quirks on eDP and add one such quirk

In reply to Hans de Goede
== Series Details ==

== Series Details ==

Series: drm: Make i915 check for panel orient quirks on eDP and add one such quirk
URL : https://patchwork.freedesktop.org/series/49389/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4788 -> Patchwork_10131 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/49389/revisions/1/mbox/

== Known issues ==

Here are the changes found in Patchwork_10131 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_exec_suspend@basic-s4-devices:
      fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)

    igt@kms_frontbuffer_tracking@basic:
      fi-byt-clapper:     PASS -> FAIL (fdo#103167)

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
      fi-byt-clapper:     PASS -> FAIL (fdo#107362, fdo#103191)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
      fi-cnl-psr:         DMESG-WARN (fdo#104951) -> PASS

    igt@kms_psr@primary_page_flip:
      fi-cnl-psr:         FAIL (fdo#107336) -> PASS

fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#104951 https://bugs.freedesktop.org/show_bug.cgi?id=104951
fdo#107336 https://bugs.freedesktop.org/show_bug.cgi?id=107336
fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718

== Participating hosts (51 -> 47) ==

Missing (4): fi-ctg-p8600 fi-ilk-m540 fi-bsw-cyan fi-hsw-4200u

== Build changes ==

* Linux: CI_DRM_4788 -> Patchwork_10131

CI_DRM_4788: 79cc335f1963668a20a974b9641be97d44b286ea @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4636: 40de31df52ffed5e392d607a83e3aea4efb150e6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10131: 0efa0ba71ccdd028e3104c2fbac2a24f4c64678a @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

0efa0ba71ccd drm: panel-orientation-quirks: Add quirk for GPD win2 c514c6c8ea38 drm/i915: Check for panel orientation quirks on eDP panels

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10131/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw

✓ Fi.CI.IGT: success for drm: Make i915 check for panel orient quirks on eDP and add one such quirk

In reply to Hans de Goede
== Series Details ==

== Series Details ==

Series: drm: Make i915 check for panel orient quirks on eDP and add one such quirk
URL : https://patchwork.freedesktop.org/series/49389/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4788_full -> Patchwork_10131_full =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_10131_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_10131_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_10131_full:

=== IGT changes ===

    ==== Warnings ====

    igt@pm_rc6_residency@rc6-accuracy:
      shard-snb:          PASS -> SKIP

== Known issues ==

Here are the changes found in Patchwork_10131_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_suspend@shrink:
      shard-hsw:          PASS -> INCOMPLETE (fdo#106886, fdo#103540)

    igt@kms_cursor_legacy@cursor-vs-flip-toggle:
      shard-kbl:          PASS -> FAIL (fdo#103355)

    igt@kms_flip@2x-flip-vs-expired-vblank-interruptible:
      shard-glk:          PASS -> FAIL (fdo#105363)

    igt@kms_setmode@basic:
      shard-kbl:          PASS -> FAIL (fdo#99912)

    
    ==== Possible fixes ====

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
      shard-apl:          DMESG-WARN (fdo#103558, fdo#105602) -> PASS +15

fdo#103355 https://bugs.freedesktop.org/show_bug.cgi?id=103355
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540
fdo#103558 https://bugs.freedesktop.org/show_bug.cgi?id=103558
fdo#105363 https://bugs.freedesktop.org/show_bug.cgi?id=105363
fdo#105602 https://bugs.freedesktop.org/show_bug.cgi?id=105602
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

== Participating hosts (5 -> 5) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4788 -> Patchwork_10131

CI_DRM_4788: 79cc335f1963668a20a974b9641be97d44b286ea @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4636: 40de31df52ffed5e392d607a83e3aea4efb150e6 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_10131: 0efa0ba71ccdd028e3104c2fbac2a24f4c64678a @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10131/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#9 lore raw
In reply to Hans de Goede

Hi,

Quoted 10 lines · Hans de Goede

Hi All,

This series fixes (works around) the gpd win 2's eDP panel being a portait mode panel being used in a landscape case (clamshell model).

I plan to merge the i915 bit through dinq and the actual quirk through drm-misc. These 2 are related in the sense that the quirk will not do anything without the i915 bits and the i915 bits only actually do anything once at least 1 quirk entry for an eDP panel is present. But they can be merged independently.

Can I get a review / acked-by for these 2 trivial patches, please ?

So that I can push 1 to dinq and the other to drm-misc/next .

Regards,

Hans

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel