summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-10-17 11:01:43 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-10-24 14:19:09 +0200
commitae3b166bf86fe27d165baf84494f98f4317e7726 (patch)
tree294f922bb50917b6647bb06f0cacdcb02f3e0047
parentcdfe992134b478b76e0763773e9d4e82bba5b98f (diff)
tests/kms_atomic_transition: Do not update unbound planes.
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 was also a related kernel bug causing failures in the same way, but that is now fixed. While at it, only check for fd completion in the nonblocking case, in the blocking case it's theoretically possible the commit completes before we check the that the commit didn't complete, most probably when the test is run in a debugger. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102671 Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
-rw-r--r--tests/kms_atomic_transition.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 7ddb65ce..4c295125 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);
}