From: Sowmiya S <sowmiya.s@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: swati2.sharma@intel.com, suraj.kandpal@intel.com,
Sowmiya S <sowmiya.s@intel.com>
Subject: [PATCH i-g-t v4 6/6] tests/kms_writeback: Refactor writeback-check-output subtest
Date: Wed, 3 Dec 2025 15:13:07 +0530 [thread overview]
Message-ID: <20251203094307.3187669-7-sowmiya.s@intel.com> (raw)
In-Reply-To: <20251203094307.3187669-1-sowmiya.s@intel.com>
Remove individual tests for each format for the test
writeback-check-output and introduce dynamic subtest
generation based on the formats supported.Framebuffer
creation was now part of the subtest level based on
the format and removed from fixture.
v4: create testcase for BGR8888 format only for intel
platforms.
Signed-off-by: Sowmiya S <sowmiya.s@intel.com>
---
tests/kms_writeback.c | 69 +++++++++++++------------------------------
1 file changed, 21 insertions(+), 48 deletions(-)
diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
index d54d649b2..cc5a8ac32 100644
--- a/tests/kms_writeback.c
+++ b/tests/kms_writeback.c
@@ -45,9 +45,6 @@
#include "sw_sync.h"
/**
- * SUBTEST: writeback-check-output-XRGB2101010
- * Description: Check XRGB2101010 writeback output with CRC validation
- *
* SUBTEST: writeback-check-output
* Description: Check writeback output with CRC validation
*
@@ -595,7 +592,7 @@ igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
igt_display_t display;
igt_output_t *output;
igt_plane_t *plane;
- igt_fb_t input_fb, input_fb_10bit;
+ igt_fb_t input_fb, in_fb;
drmModeModeInfo mode;
unsigned int fb_id;
int ret;
@@ -636,15 +633,6 @@ igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
&input_fb);
igt_assert(fb_id >= 0);
- if (data.supported_colors & XRGB2101010) {
- fb_id = igt_create_fb(display.drm_fd, mode.hdisplay,
- mode.vdisplay,
- DRM_FORMAT_XRGB2101010,
- DRM_FORMAT_MOD_LINEAR,
- &input_fb_10bit);
- igt_assert(fb_id >= 0);
- }
-
igt_plane_set_fb(plane, &input_fb);
if (data.list_modes)
@@ -709,7 +697,6 @@ igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
if (!strstr(igt_format_str(test_format), "BGR"))
continue;
igt_dynamic_f("writeback-fb-id-%s", igt_format_str(test_format)) {
- igt_fb_t in_fb;
igt_fb_t output_fb;
igt_skip_on(data.dump_check || data.list_modes);
@@ -718,53 +705,39 @@ igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
igt_format_str(test_format));
create_fbs(&display, &in_fb, &output_fb, test_format, &mode);
writeback_fb_id(output, &in_fb, &output_fb);
- igt_remove_fb(display.drm_fd, &in_fb);
igt_remove_fb(display.drm_fd, &output_fb);
}
}
}
igt_describe("Check writeback output with CRC validation");
- igt_subtest("writeback-check-output") {
- igt_fb_t output_fb;
-
- igt_skip_on(data.dump_check || data.list_modes);
- igt_skip_on_f(!(data.supported_colors & XRGB8888),"DRM_FORMAT_XRGB8888 is unsupported\n");
- fb_id = igt_create_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
- DRM_FORMAT_XRGB8888,
- igt_fb_mod_to_tiling(0),
- &output_fb);
- igt_require(fb_id > 0);
-
- writeback_check_output(output, plane, &input_fb, &output_fb, DRM_FORMAT_XRGB8888);
-
- igt_remove_fb(display.drm_fd, &output_fb);
- }
-
- igt_describe("Check XRGB2101010 writeback output with CRC validation");
- igt_subtest("writeback-check-output-XRGB2101010") {
- igt_fb_t output_fb;
-
- igt_skip_on(data.dump_check || data.list_modes);
- igt_skip_on_f(!(data.supported_colors & XRGB2101010), "DRM_FORMAT_XRGB2101010 is unsupported\n");
- fb_id = igt_create_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
- DRM_FORMAT_XRGB2101010,
- igt_fb_mod_to_tiling(0),
- &output_fb);
- igt_require(fb_id > 0);
+ igt_subtest_with_dynamic_f("writeback-check-output") {
+ for (int i = 0; i < ARRAY_SIZE(fourcc); i++) {
+ uint32_t test_format = fourcc[i];
- writeback_check_output(output, plane, &input_fb_10bit, &output_fb, DRM_FORMAT_XRGB2101010);
+ if (is_intel_device(display.drm_fd))
+ if (!strstr(igt_format_str(test_format), "BGR8888"))
+ continue;
+ igt_dynamic_f("writeback-check-output-%s", igt_format_str(test_format)) {
+ igt_fb_t output_fb;
- igt_remove_fb(display.drm_fd, &output_fb);
+ igt_skip_on(data.dump_check || data.list_modes);
+ igt_skip_on_f(!(data.supported_colors & (1 << i)),
+ "DRM_FORMAT_%s is not supported\n",
+ igt_format_str(test_format));
+ create_fbs(&display, &in_fb, &output_fb, test_format, &mode);
+ igt_plane_set_fb(plane, &in_fb);
+ writeback_check_output(output, plane, &in_fb,
+ &output_fb, test_format);
+ igt_remove_fb(display.drm_fd, &output_fb);
+ }
+ }
}
igt_fixture {
cleanup_writeback(&display, output);
igt_remove_fb(display.drm_fd, &input_fb);
-
- if (data.supported_colors & XRGB2101010)
- igt_remove_fb(display.drm_fd, &input_fb_10bit);
-
+ igt_remove_fb(display.drm_fd, &in_fb);
igt_display_fini(&display);
drm_close_driver(display.drm_fd);
}
--
2.43.0
next prev parent reply other threads:[~2025-12-03 9:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-03 9:43 [PATCH i-g-t v4 0/6] Add writeback changes for intel-supported formats Sowmiya S
2025-12-03 9:43 ` [PATCH i-g-t v4 1/6] tests/kms_writeback: Add support for intel-specific formats Sowmiya S
2026-01-08 5:14 ` Kandpal, Suraj
2025-12-03 9:43 ` [PATCH i-g-t v4 2/6] lib/igt_fb: Validate supported formats for crc calculation Sowmiya S
2026-01-08 5:16 ` Kandpal, Suraj
2025-12-03 9:43 ` [PATCH i-g-t v4 3/6] tests/kms_writeback: Add intel specific check Sowmiya S
2026-01-08 5:18 ` Kandpal, Suraj
2026-01-08 9:35 ` S, Sowmiya
2025-12-03 9:43 ` [PATCH i-g-t v4 4/6] tests/kms_writeback: Refactor format handling in commit_and_dump_fb Sowmiya S
2026-01-08 5:13 ` Kandpal, Suraj
2026-01-08 9:34 ` S, Sowmiya
2025-12-03 9:43 ` [PATCH i-g-t v4 5/6] tests/kms_writeback: Refactor writeback-fb-id subtest Sowmiya S
2026-01-08 5:25 ` Kandpal, Suraj
2026-01-12 8:56 ` Kamil Konieczny
2026-01-12 15:54 ` S, Sowmiya
2025-12-03 9:43 ` Sowmiya S [this message]
2026-01-08 5:31 ` [PATCH i-g-t v4 6/6] tests/kms_writeback: Refactor writeback-check-output subtest Kandpal, Suraj
2025-12-03 10:57 ` ✗ Xe.CI.BAT: failure for Add writeback changes for intel-supported formats (rev4) Patchwork
2025-12-03 10:59 ` ✗ i915.CI.BAT: " Patchwork
2025-12-03 12:36 ` ✓ Xe.CI.Full: success " Patchwork
2025-12-04 23:07 ` [PATCH i-g-t v4 0/6] Add writeback changes for intel-supported formats Alex Hung
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251203094307.3187669-7-sowmiya.s@intel.com \
--to=sowmiya.s@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=suraj.kandpal@intel.com \
--cc=swati2.sharma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.