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

Stanislav Lisovskiy stanislav.lisovskiy at intel.com
Tue Apr 9 18:03:17 UTC 2019


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

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

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 18f73317..113031af 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;
 
@@ -294,10 +296,6 @@ retry:
 			    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;
-- 
2.17.1



More information about the igt-dev mailing list