[igt-dev] [PATCH i-g-t 2/2] [i-g-t] tests/kms: IGT cleanup
Mohammed Thasleem
mohammed.thasleem at intel.com
Wed Apr 20 12:07:24 UTC 2022
Before starting the subtest, clean up the states to default
by igt_display_reset().
Replace newly defined function in particular test with existing
library function.
Signed-off-by: Mohammed Thasleem <mohammed.thasleem at intel.com>
---
tests/kms_lease.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/kms_lease.c b/tests/kms_lease.c
index 0bf102a6..6e8f06d5 100644
--- a/tests/kms_lease.c
+++ b/tests/kms_lease.c
@@ -100,6 +100,8 @@ static int prepare_crtc(lease_t *lease, uint32_t connector_id, uint32_t crtc_id)
if (!output)
return -ENOENT;
+ igt_display_reset(display);
+
/* select the pipe we want to use */
igt_output_set_pipe(output, pipe);
@@ -136,8 +138,8 @@ static void cleanup_crtc(lease_t *lease, igt_output_t *output)
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);
+ igt_output_set_pipe(output, PIPE_NONE);
+ igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
}
static int create_lease(int fd, struct drm_mode_create_lease *mcl)
--
2.25.1
More information about the igt-dev
mailing list