[igt-dev] [PATCH i-g-t v9 1/3] igt/tests: Remove redundant alpha retry

Stanislav Lisovskiy stanislav.lisovskiy at intel.com
Wed Apr 10 11:32:03 UTC 2019


Using igt_plane_has_format_mod allows to save
time not doing redundant retry, knowing if
plane supports alpha beforehand.

v2: Remove unneeded assertion also.

Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy at intel.com>
---
 tests/kms_atomic_transition.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 18f73317..6f16a928 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -232,6 +232,9 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
 			parms[i].height = cursor_height;
 			parms[i].mask = 1 << 1;
 		} else {
+			if (!n_overlays)
+				alpha = igt_plane_has_format_mod(plane,
+					DRM_FORMAT_ARGB8888, LOCAL_DRM_FORMAT_MOD_NONE);
 			parms[i].fb = sprite_fb;
 			parms[i].mask = 1 << 2;
 
@@ -272,7 +275,6 @@ static void setup_parms(igt_display_t *display, enum pipe pipe,
 	 * Pre gen9 not all sizes are supported, find the biggest possible
 	 * size that can be enabled on all sprite planes.
 	 */
-retry:
 	prev_w = sprite_width = cursor_width;
 	prev_h = sprite_height = cursor_height;
 
@@ -290,16 +292,6 @@ retry:
 		igt_assert(!is_atomic_check_failure_errno(ret));
 
 		if (is_atomic_check_plane_size_errno(ret)) {
-			if (cursor_width == sprite_width &&
-			    cursor_height == sprite_height) {
-				igt_assert_f(alpha,
-					      "Cannot configure the test with all sprite planes enabled\n");
-
-				/* retry once with XRGB format. */
-				alpha = false;
-				goto retry;
-			}
-
 			sprite_width = prev_w;
 			sprite_height = prev_h;
 
-- 
2.17.1



More information about the igt-dev mailing list