[igt-dev] [PATCH i-g-t] tests/kms_plane: Don't test every plane on icl+

Ville Syrjala ville.syrjala at linux.intel.com
Fri Oct 25 19:01:34 UTC 2019


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

Only test one plane of each type (HDR, SDR UV, SDR Y) on icl+.
For the purposes of validating pixel formats this should be sufficient
as the programming of each plane of the same type is identical and
as such it's unlikely we'd have different bugs between them.

As before we'll leave the full test set available to be run at
the user's discretion via --extended.

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

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 86a3a6296d26..7672374f5152 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -757,6 +757,26 @@ static bool test_format_plane(data_t *data, enum pipe pipe,
 	return result;
 }
 
+static bool skip_plane(data_t *data, igt_plane_t *plane)
+{
+	int index = plane->index;
+
+	if (data->extended)
+		return false;
+
+	if (!is_i915_device(data->drm_fd))
+		return false;
+
+	if (plane->type == DRM_PLANE_TYPE_CURSOR)
+		return false;
+
+	if (intel_gen(intel_get_drm_devid(data->drm_fd)) < 11)
+		return false;
+
+	/* test 1 HDR plane, 1 SDR UV plane, 1 SDR Y plane */
+	return index != 0 && index != 3 && index != 5;
+}
+
 static void
 test_pixel_formats(data_t *data, enum pipe pipe)
 {
@@ -794,8 +814,11 @@ test_pixel_formats(data_t *data, enum pipe pipe)
 	test_init(data, pipe);
 
 	result = true;
-	for_each_plane_on_pipe(&data->display, pipe, plane)
+	for_each_plane_on_pipe(&data->display, pipe, plane) {
+		if (skip_plane(data, plane))
+			continue;
 		result &= test_format_plane(data, pipe, output, plane);
+	}
 
 	test_fini(data);
 
-- 
2.21.0



More information about the igt-dev mailing list