New way of doing things is calling igt_display_reset() before any setup code. This way if the configuration stays the same, the initial modeset will be a noop.
Signed-off-by: Maarten Lankhorst <maarten.lankho...@linux.intel.com> --- tests/kms_vblank.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c index f2fa11523d50..3d8004ef6c3f 100644 --- a/tests/kms_vblank.c +++ b/tests/kms_vblank.c @@ -74,6 +74,8 @@ static void prepare_crtc(data_t *data, int fd, igt_output_t *output) igt_display_t *display = &data->display; igt_plane_t *primary; + igt_display_reset(display); + /* select the pipe we want to use */ igt_output_set_pipe(output, data->pipe); @@ -95,16 +97,7 @@ static void prepare_crtc(data_t *data, int fd, igt_output_t *output) static void cleanup_crtc(data_t *data, int fd, igt_output_t *output) { - igt_display_t *display = &data->display; - igt_plane_t *primary; - igt_remove_fb(fd, &data->primary_fb); - - primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY); - igt_plane_set_fb(primary, NULL); - - igt_output_set_pipe(output, PIPE_ANY); - igt_display_commit(display); } static int wait_vblank(int fd, union drm_wait_vblank *vbl) -- 2.15.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx