[igt-dev] [PATCH i-g-t v1] tests/kms_universal_plane: Change num_primary and num_cursor asserts into warnings

Jessica Zhang quic_jesszhan at quicinc.com
Thu Apr 21 21:34:42 UTC 2022


This check was originally put in place to prevent accidental calls to
drm_plane_init instead of drm_universal_plane_init to go uncaught due to
similarities in parameters.

However, both method signatures have now diverged enough so that
accidental calls will be caught by the compiler. In addition, DRM allows
drivers to support multiple primary planes, so demoting the assert to a
warning instead will prevent subtests from being blocked for drivers
where multiple primary planes are supported.

Signed-off-by: Jessica Zhang <quic_jesszhan at quicinc.com>
---
 tests/kms_universal_plane.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 2e8958979dd6..3cb6d704a6ef 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -154,8 +154,8 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
 		else if (display->pipes[pipe].planes[i].type == DRM_PLANE_TYPE_CURSOR)
 			num_cursor++;
 
-	igt_assert_eq(num_primary, 1);
-	igt_assert_lte(num_cursor, 1);
+	igt_warn_on(num_primary != 1);
+	igt_warn_on(num_cursor > 1);
 
 	primary = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
 	sprite = igt_output_get_plane_type(output, DRM_PLANE_TYPE_OVERLAY);
-- 
2.31.0



More information about the igt-dev mailing list