if (parms[i].width <= 512)
@@ -436,10 +442,8 @@ run_transition_test(igt_display_t *display, enum
pipe pipe, igt_output_t *output
wm_setup_plane(display, pipe, i, parms);
- if (fencing)
- igt_pipe_set_out_fence_ptr(&display->pipes[pipe],
&out_fence);
+ atomic_commit(display, pipe, flags, (void *)(unsigned long)i,
fencing);
- igt_display_commit_atomic(display, flags, (void *)(unsigned
long)i);
drmHandleEvent(display->drm_fd, &drm_events);
if (type == TRANSITION_MODESET_DISABLE) {
@@ -463,19 +467,14 @@ run_transition_test(igt_display_t *display, enum
pipe pipe, igt_output_t *output
if (type == TRANSITION_MODESET)
igt_output_override_mode(output, &override_mode);
- if (fencing)
- igt_pipe_set_out_fence_ptr(&display->pipes[pipe],
&out_fence);
-
- igt_display_commit_atomic(display, flags, (void
*)(unsigned long)j);
+ atomic_commit(display, pipe, flags, (void *)(unsigned
long)i, fencing);
drmHandleEvent(display->drm_fd, &drm_events);
wm_setup_plane(display, pipe, i, parms);
if (type == TRANSITION_MODESET)
igt_output_override_mode(output, NULL);
- if (fencing)
- igt_pipe_set_out_fence_ptr(&display->pipes[pipe],
&out_fence);
-
+ atomic_commit(display, pipe, flags, (void *)(unsigned
long)i, fencing);
igt_display_commit_atomic(display, flags, (void
*)(unsigned long)i);
drmHandleEvent(display->drm_fd, &drm_events);
}
@@ -483,6 +482,8 @@ run_transition_test(igt_display_t *display, enum
pipe pipe, igt_output_t *output
}
cleanup:
+ unprepare_fencing(display, pipe);
+
igt_output_set_pipe(output, PIPE_NONE);
for_each_plane_on_pipe(display, pipe, plane)
@@ -617,7 +618,7 @@ static void collect_crcs_mask(igt_pipe_crc_t
**pipe_crcs, unsigned mask, igt_crc
}
}
-static void run_modeset_tests(igt_display_t *display, int howmany,
bool nonblocking)
+static void run_modeset_tests(igt_display_t *display, int howmany,
bool nonblocking, bool fencing)
{
struct igt_fb fbs[2];
int i, j;
@@ -664,6 +665,9 @@ static void run_modeset_tests(igt_display_t
*display, int howmany, bool nonblock
igt_plane_set_size(plane, mode->hdisplay, mode->vdisplay);
} else
igt_plane_set_fb(plane, NULL);
+
+ if(fencing)
+ igt_pipe_request_out_fence(&display->pipes[i]);
}
/*
@@ -751,7 +755,7 @@ cleanup:
}
-static void run_modeset_transition(igt_display_t *display, int
requested_outputs, bool nonblocking)
+static void run_modeset_transition(igt_display_t *display, int
requested_outputs, bool nonblocking, bool fencing)
{
igt_output_t *outputs[I915_MAX_PIPES] = {};
int num_outputs = 0;
@@ -779,7 +783,7 @@ static void run_modeset_transition(igt_display_t
*display, int requested_outputs
"Should have at least %i outputs, found %i\n",
requested_outputs, num_outputs);
- run_modeset_tests(display, requested_outputs, nonblocking);
+ run_modeset_tests(display, requested_outputs, nonblocking, fencing);
}
igt_main
@@ -838,10 +842,16 @@ igt_main
for (i = 1; i <= I915_MAX_PIPES; i++) {
igt_subtest_f("%ix-modeset-transitions", i)
- run_modeset_transition(&display, i, false);
+ run_modeset_transition(&display, i, false, false);
igt_subtest_f("%ix-modeset-transitions-nonblocking", i)
- run_modeset_transition(&display, i, true);
+ run_modeset_transition(&display, i, true, false);
+
+ igt_subtest_f("%ix-modeset-transitions-fencing", i)
+ run_modeset_transition(&display, i, false, true);
+
+ igt_subtest_f("%ix-modeset-transitions-nonblocking-fencing", i)
+ run_modeset_transition(&display, i, true, true);
}
igt_fixture {
--
2.11.0.453.g787f75f05