summaryrefslogtreecommitdiff
path: root/tests/kms_vblank.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-01-04 12:50:19 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-01-24 12:01:41 +0100
commit63f7ef01908c9925bbacbbbac76fdc0ba15967c5 (patch)
treeb0a73461f0eb1202c6586cb3b54e85e9609ad490 /tests/kms_vblank.c
parent07a3fccf3e20f34b86115b480e36445ec2e6c779 (diff)
kms_vblank: Remove teardown code from cleanup_crtc
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.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/kms_vblank.c')
-rw-r--r--tests/kms_vblank.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/kms_vblank.c b/tests/kms_vblank.c
index 7c3885bd..5df2da7b 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)