Skip to contentSkip to conversation

tests/kms_atomic_transition: Don't abuse the HSKEW flag to force a modeset

PATCH In review Ville Syrjala 4 participants 6 messages Jan 30, 2018 – Feb 28, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/kms_atomic_transition: Don't abuse the HSKEW flag to force a modeset

From: Ville Syrjälä <[email protected]>

Since kernel commit e995ca0b8139 ("drm/i915: Provide a device level .mode_valid() hook") i915 will bluntly reject the HSKEW mode flag. Thus we can't abuse it to force a modeset.

Since we don't particularly care about the visual results here we can risk making the display unhappy by eg. flipping the hsync polarity instead.

Also add a comment documenting why we're doing this.

Cc: Maarten Lankhorst <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104848

---
 tests/kms_atomic_transition.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_atomic_transition.c +2 -1
index 798639393421..aa9a6f8439ea 100644
@@ -410,7 +410,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
 
 	mode = igt_output_get_mode(output);
 	override_mode = *mode;
-	override_mode.flags |= DRM_MODE_FLAG_HSKEW;
+	/* try to force a modeset */
+	override_mode.flags ^= DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC;
 
 	igt_create_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
 		      DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, &fb);
Signature · 6 lines
2.13.6

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 1/1
#1 lore raw

Op 30-01-18 om 16:49 schreef Ville Syrjala:

Quoted 9 lines

From: Ville Syrjälä <[email protected]>

Since kernel commit e995ca0b8139 ("drm/i915: Provide a device level .mode_valid() hook") i915 will bluntly reject the HSKEW mode flag. Thus we can't abuse it to force a modeset.

Since we don't particularly care about the visual results here we can risk making the display unhappy by eg. flipping the hsync polarity instead.

Quoted 14 lines

Also add a comment documenting why we're doing this.

Cc: Maarten Lankhorst <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104848

---
 tests/kms_atomic_transition.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_atomic_transition.c +0 -0
index 798639393421..aa9a6f8439ea 100644

tests/kms_atomic_transition.c run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output · line 417

Quoted 9 lines
tests/kms_atomic_transition.c +2 -1
@@ -410,7 +410,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
 
 	mode = igt_output_get_mode(output);
 	override_mode = *mode;
-	override_mode.flags |= DRM_MODE_FLAG_HSKEW;
+	/* try to force a modeset */
+	override_mode.flags ^= DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC;
 
 	igt_create_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
 		      DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, &fb);

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

#2 lore raw
Quoted 11 lines · Maarten Lankhorst

Op 30-01-18 om 16:49 schreef Ville Syrjala:

Quoted 9 lines

From: Ville Syrjälä <[email protected]>

Since kernel commit e995ca0b8139 ("drm/i915: Provide a device level .mode_valid() hook") i915 will bluntly reject the HSKEW mode flag. Thus we can't abuse it to force a modeset.

Since we don't particularly care about the visual results here we can risk making the display unhappy by eg. flipping the hsync polarity instead.

Pushed, thanks.

Quoted 24 lines
Quoted 23 lines

Also add a comment documenting why we're doing this.

Cc: Maarten Lankhorst <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104848

---
 tests/kms_atomic_transition.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_atomic_transition.c +2 -1
index 798639393421..aa9a6f8439ea 100644
@@ -410,7 +410,8 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
 
 	mode = igt_output_get_mode(output);
 	override_mode = *mode;
-	override_mode.flags |= DRM_MODE_FLAG_HSKEW;
+	/* try to force a modeset */
+	override_mode.flags ^= DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC;
 
 	igt_create_fb(display->drm_fd, mode->hdisplay, mode->vdisplay,
 		      DRM_FORMAT_XRGB8888, LOCAL_DRM_FORMAT_MOD_NONE, &fb);
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#3 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_atomic_transition: Don't abuse the HSKEW flag to force a modeset

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: tests/kms_atomic_transition: Don't abuse the HSKEW flag to force a modeset
URL : https://patchwork.freedesktop.org/series/37353/
State : failure

== Summary ==

Series 37353 revision 1 was fully merged or fully failed: no git log

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

#4 lore raw

Re: [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_atomic_transition: Don't abuse the HSKEW flag to force a modeset

Quoted 5 lines · Patchwork

== Series Details ==

Series: tests/kms_atomic_transition: Don't abuse the HSKEW flag to force a modeset
URL : https://patchwork.freedesktop.org/series/37353/
State : failure

Hey Ville,

Why was this merged without waiting for the pre-merge results to come back?

- Arek
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw

Re: [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_atomic_transition: Don't abuse the HSKEW flag to force a modeset

Quoted 10 lines · Arkadiusz Hiler
Quoted 5 lines · Patchwork

== Series Details ==

Series: tests/kms_atomic_transition: Don't abuse the HSKEW flag to force a modeset
URL : https://patchwork.freedesktop.org/series/37353/
State : failure

Hey Ville,

Why was this merged without waiting for the pre-merge results to come back?

No idea. I guess I just wanted the test to start working again and didn't bother waiting for the results.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev