[Intel-gfx] [PATCH i-g-t 7/7] kms_vblank: Remove teardown code from cleanup_crtc

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Jan 4 13:15:09 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>
---
 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



More information about the Intel-gfx mailing list