[PATCH i-g-t v1 2/2] tests/kms_plane: Split pixel format tests by RGB/YUV filtering
Naladala Ramanaidu
ramanaidu.naladala at intel.com
Wed Jul 16 09:20:36 UTC 2025
Introduced dynamic subtests for each pixel format type, covering
both clamped and unclamped scenarios.
Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
---
tests/kms_plane.c | 48 +++++++++++++++++++++++++++++++++++++++--------
1 file changed, 40 insertions(+), 8 deletions(-)
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index f7b672c7a..cb89e74c0 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -72,13 +72,18 @@
*/
/**
- * SUBTEST: pixel-%s
+ * SUBTEST: pixel-format-%s
* Description: verify the pixel formats for given plane and pipe
*
+ * SUBTEST: pixel-format-%s-source-clamping
+ * Description: verify the pixel formats with source clamping for given
+ * plane and pipe
+ *
* arg[1]:
*
- * @format:
- * @format-source-clamping: with source clamping
+ * @rgb: rgb
+ * @planar: planar
+ * @packed: packed
*/
/*
@@ -114,6 +119,7 @@ typedef struct {
uint32_t crop;
bool extended;
unsigned int flags;
+ const char *pixel_format_type;
} data_t;
static bool all_pipes;
@@ -1106,6 +1112,18 @@ static void test_format_plane(data_t *data, enum pipe pipe,
f.modifier == ref.modifier)
continue;
+ if (strcmp(data->pixel_format_type, "packed") == 0) {
+ if (!igt_format_is_packedyuv(f.format))
+ continue;
+ } else if (strcmp(data->pixel_format_type, "planar") == 0) {
+ if (!igt_format_is_planaryuv(f.format))
+ continue;
+ } else if (strcmp(data->pixel_format_type, "rgb") == 0) {
+ if (igt_format_is_packedyuv(f.format) ||
+ igt_format_is_planaryuv(f.format))
+ continue;
+ }
+
if (skip_format_mod(data, f.format, f.modifier, &tested_formats)) {
igt_info("Skipping format " IGT_FORMAT_FMT " / modifier "
IGT_MODIFIER_FMT " on %s.%u\n",
@@ -1348,14 +1366,28 @@ static void dynamic_test_handler(data_t *data, enum pipe pipe)
static void
run_tests_for_pipe_plane(data_t *data)
{
+ uint32_t z;
+ const char *append[3] = {
+ "rgb",
+ "planar",
+ "packed"
+ };
+
igt_describe("verify the pixel formats for given plane and pipe");
- igt_subtest_with_dynamic_f("pixel-format")
- run_test(data, test_pixel_formats);
+ for (z = 0; z < ARRAY_SIZE(append); z++) {
+ igt_subtest_with_dynamic_f("pixel-format-%s", append[z]) {
+ data->pixel_format_type = append[z];
+ run_test(data, test_pixel_formats);
+ }
+ }
igt_describe("verify the pixel formats for given plane and pipe with source clamping");
- igt_subtest_with_dynamic_f("pixel-format-source-clamping") {
- data->crop = 4;
- run_test(data, test_pixel_formats);
+ for (z = 0; z < ARRAY_SIZE(append); z++) {
+ igt_subtest_with_dynamic_f("pixel-format-%s-source-clamping", append[z]) {
+ data->crop = 4;
+ data->pixel_format_type = append[z];
+ run_test(data, test_pixel_formats);
+ }
}
data->crop = 0;
--
2.43.0
More information about the igt-dev
mailing list