diff options
author | Bhanuprakash Modem <bhanuprakash.modem@intel.com> | 2021-05-12 22:35:30 +0530 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2021-05-19 10:54:29 +0300 |
commit | 5b599003b1fe1d9667c3426b3a726946ee2a5f0e (patch) | |
tree | 11a45607a348fa7ec90496a0f8b4e062b29addab /tests/kms_plane.c | |
parent | a1772be7dede83a4f65e5986fd7083a9c8f89083 (diff) |
tests/kms_plane: Reset the state before exiting the test
Before starting the next subtest, clean up the states to default
values, those are assumed by other tests. This patch will also fix
few typos & depricated macros.
Cc: Imre Deak <imre.deak@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Diffstat (limited to 'tests/kms_plane.c')
-rw-r--r-- | tests/kms_plane.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/kms_plane.c b/tests/kms_plane.c index 3511efa7..d7cbe892 100644 --- a/tests/kms_plane.c +++ b/tests/kms_plane.c @@ -256,7 +256,11 @@ test_plane_position_with_output(data_t *data, igt_plane_set_fb(sprite, NULL); /* reset the constraint on the pipe */ - igt_output_set_pipe(output, PIPE_ANY); + igt_output_set_pipe(output, PIPE_NONE); + igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY); + + igt_remove_fb(data->drm_fd, &primary_fb); + igt_remove_fb(data->drm_fd, &sprite_fb); } static void @@ -293,7 +297,7 @@ test_plane_position(data_t *data, enum pipe pipe, unsigned int flags) * (vdisplay, hdisplay) we do get the same CRC than the full blue fb. */ static void -create_fb_for_mode__panning(data_t *data, drmModeModeInfo *mode, +create_fb_for_mode_panning(data_t *data, drmModeModeInfo *mode, struct igt_fb *fb /* out */) { unsigned int fb_id; @@ -339,7 +343,7 @@ test_plane_panning_with_output(data_t *data, mode = igt_output_get_mode(output); primary = igt_output_get_plane(output, 0); - create_fb_for_mode__panning(data, mode, &primary_fb); + create_fb_for_mode_panning(data, mode, &primary_fb); igt_plane_set_fb(primary, &primary_fb); if (flags & TEST_PANNING_TOP_LEFT) @@ -360,8 +364,11 @@ test_plane_panning_with_output(data_t *data, igt_plane_set_fb(primary, NULL); /* reset states to neutral values, assumed by other tests */ - igt_output_set_pipe(output, PIPE_ANY); + igt_output_set_pipe(output, PIPE_NONE); igt_fb_set_position(&primary_fb, primary, 0, 0); + igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY); + + igt_remove_fb(data->drm_fd, &primary_fb); } static void |