summaryrefslogtreecommitdiff
path: root/tests/kms_sequence.c
diff options
context:
space:
mode:
authorNidhi Gupta <nidhi1.gupta@intel.com>2022-04-22 20:50:47 +0530
committerPetri Latvala <petri.latvala@intel.com>2022-04-25 11:45:54 +0300
commit35debd1b166a3bd8c4c56e61142344a8d66e5f5c (patch)
tree08c2e06ebdb7564653484af27b9eb32eaa419680 /tests/kms_sequence.c
parent646febeb230c105261caf05441fc6bf7aa3edea0 (diff)
tests/kms: sanitize the system state between subtests
Before running the subtest we need to sanitize the system state to default, since we can't trust the state of previous subtest, used igt_display_reset() to sanitize the state. Replace newly defined function in particular test with existing library function. Below tests are modified: tests/kms_concurrent.c tests/kms_sequence.c Signed-off-by: Nidhi Gupta <nidhi1.gupta@intel.com> Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Diffstat (limited to 'tests/kms_sequence.c')
-rw-r--r--tests/kms_sequence.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/kms_sequence.c b/tests/kms_sequence.c
index 9c287480..ca25e041 100644
--- a/tests/kms_sequence.c
+++ b/tests/kms_sequence.c
@@ -77,6 +77,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(&data->display);
+
/* select the pipe we want to use */
igt_output_set_pipe(output, data->pipe);
@@ -109,8 +111,8 @@ static void cleanup_crtc(data_t *data, int fd, 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 crtc_get_sequence(int fd, struct drm_crtc_get_sequence *cgs)