[igt-dev] [v4 i-g-t 09/14] tests/kms_plane_alpha_blend: Reset the state before exiting the test

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue May 4 00:43:08 UTC 2021


Before starting the next subtest, clean up the states to default
values, those are assumed by other tests. This patch will also fix
few redundant checks.

Cc: Imre Deak <imre.deak at intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/kms_plane_alpha_blend.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 5e80ae36e..a37cb27c7 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -237,8 +237,6 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe)
 	}
 
 	igt_plane_set_fb(primary, &data->black_fb);
-	/* reset alpha property to default */
-	reset_alpha(display, pipe);
 }
 
 static void basic_alpha(data_t *data, enum pipe pipe, igt_plane_t *plane)
@@ -507,6 +505,9 @@ static void run_test_on_pipe_planes(data_t *data, enum pipe pipe, bool blend,
 		igt_plane_set_fb(plane, NULL);
 	}
 
+	igt_output_set_pipe(output, PIPE_NONE);
+	igt_display_commit2(display, COMMIT_ATOMIC);
+
 	igt_require_f(found, "No planes with %s property found\n",
 		      blend ? "pixel blending mode" : "alpha");
 	igt_require_f(multiply, "Multiplied (plane x pixel) alpha not available\n");
-- 
2.20.1



More information about the igt-dev mailing list