public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/kms_atomic_transition: Make tests pass
@ 2017-10-20 13:24 Maarten Lankhorst
  2017-10-20 14:48 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Maarten Lankhorst @ 2017-10-20 13:24 UTC (permalink / raw)
  To: intel-gfx

kms_atomic_transition was updating already disabled planes and committing
them nonblockingly. This results in sporadic -EBUSY failures because
planes that are unbound have their own timeline.

The solution is not unbinding already unbound planes, making the test
pass. There is also a related kernel bug causing failures in the same
way, but that will get fixed soon.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102671
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 tests/kms_atomic_transition.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 7ddb65cea183..4c295125a8a7 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -134,7 +134,8 @@ wm_setup_plane(igt_display_t *display, enum pipe pipe,
 		int i = plane->index;
 
 		if (!((1 << plane->index) & mask)) {
-			igt_plane_set_fb(plane, NULL);
+			if (plane->values[IGT_PLANE_FB_ID])
+				igt_plane_set_fb(plane, NULL);
 			continue;
 		}
 
@@ -388,11 +389,13 @@ static void wait_for_transition(igt_display_t *display, enum pipe pipe, bool non
 	if (fencing) {
 		int fence_fd = display->pipes[pipe].out_fence_fd;
 
-		igt_assert_neq(fd_completed(fence_fd), nonblocking);
+		if (!nonblocking)
+			igt_assert(fd_completed(fence_fd));
 
 		igt_assert(sync_fence_wait(fence_fd, 30000) == 0);
 	} else {
-		igt_assert_neq(fd_completed(display->drm_fd), nonblocking);
+		if (!nonblocking)
+			igt_assert(fd_completed(display->drm_fd));
 
 		drmHandleEvent(display->drm_fd, &drm_events);
 	}
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-10-24 15:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-20 13:24 [PATCH i-g-t] tests/kms_atomic_transition: Make tests pass Maarten Lankhorst
2017-10-20 14:48 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-20 16:28 ` ✓ Fi.CI.IGT: " Patchwork
2017-10-23  9:35 ` [PATCH i-g-t] " Petri Latvala
2017-10-23 10:15   ` Maarten Lankhorst
2017-10-24 12:10     ` Petri Latvala
2017-10-24 15:09       ` Maarten Lankhorst
2017-10-24 14:53 ` ✗ Fi.CI.BAT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox