[igt-dev] [PATCH i-g-t] tests/kms_big_fb: Check plane capabilities properly in async flip tests

Ville Syrjala ville.syrjala at linux.intel.com
Wed Jan 26 07:34:10 UTC 2022


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Currently IVB only supports 64bpp formats on the sprite planes
but not on the primary plane. This means
igt_display_has_format_mod(64bpp)->true and thus we will try to
run the 64bpp async flip tests. But since that test uses the
primary plane we will fail to actually enable the plane. Fix
this by making sure the plane actually supports the format (and
let's also check the rotation for good measure).

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/i915/kms_big_fb.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/i915/kms_big_fb.c b/tests/i915/kms_big_fb.c
index c997cf171a05..9ebf615512bb 100644
--- a/tests/i915/kms_big_fb.c
+++ b/tests/i915/kms_big_fb.c
@@ -489,7 +489,12 @@ max_hw_stride_async_flip_test(data_t *data)
 
 	primary = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
 
-	igt_require(igt_plane_has_rotation(primary, data->rotation));
+	if (!igt_plane_has_format_mod(primary, data->format, data->modifier))
+		return false;
+
+	if (!igt_plane_has_rotation(primary, data->rotation))
+		return false;
+
 	igt_plane_set_rotation(primary, data->rotation);
 
 	igt_require_f(igt_display_try_commit2(&data->display, COMMIT_ATOMIC) == 0,
-- 
2.34.1



More information about the igt-dev mailing list