[igt-dev] [for trybot 6/7] kms_vblank: Remove teardown code from cleanup_crtc

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Jan 18 11:14:05 UTC 2018


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 at linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 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 7c3885bd7cff..5df2da7b038c 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



More information about the igt-dev mailing list