Add writeback changes for intel-supported formats
v6 cover Add writeback changes for intel-supported formats
This series introduces validation for writeback functionality across newly supported formats specific to Intel platforms. existing functions with limited format support were retained for compatibility. After validating new formats introduced by the platform, additional format support was added to the writeback test suite. Subtests leveraging common framebuffer creation logic were consolidated and dynamic subtest generation was implemented to efficiently handle format-specific variations. Refactored existing test cases to improve efficiency. Add helper function to get the default format.
lib/igt_fb.c | 39 +++++++- lib/igt_fb.h | 1 + tests/kms_writeback.c | 216 +++++++++++++++++++++++++----------------- 3 files changed, 168 insertions(+), 88 deletions(-)
Signature · 1 line
2.43.0
PATCH v6 1/8 tests/kms_writeback: Add support for intel-specific formats
Integrate BGR formats supported by intel into the supported format list and verify format before test execution.
v4: Reframe commit message. (Suraj)
--- tests/kms_writeback.c | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-)
tests/kms_writeback.c +21 -8
@@ -90,6 +90,15 @@ static data_t data;enum {XRGB8888 =1 <<0 ,XRGB2101010 =1 <<1 , +XBGR8888 =1 <<2 , +XBGR2101010 =1 <<3 , +}; + +const uint32_t fourcc[] = { +DRM_FORMAT_XRGB8888 , +DRM_FORMAT_XRGB2101010 , +DRM_FORMAT_XBGR8888 , +DRM_FORMAT_XBGR2101010 , }; static bool check_writeback_config(igt_display_t *display, igt_output_t *output,
@@ -101,11 +110,6 @@ static bool check_writeback_config(igt_display_t *display, igt_output_t *output,int width, height, ret;uint16_t i; -const uint32_t fourcc[] = { -DRM_FORMAT_XRGB8888 , -DRM_FORMAT_XRGB2101010 , - }; -igt_output_override_mode (output, &override_mode); width = override_mode.hdisplay;
@@ -299,7 +303,10 @@ static void fill_fb(igt_fb_t *fb, uint32_t pixel)uint32_t *ptr;int64_t pixel_count, i; -igt_assert (fb->drm_format ==DRM_FORMAT_XRGB8888 || fb->drm_format ==DRM_FORMAT_XRGB2101010 ); +igt_assert (fb->drm_format ==DRM_FORMAT_XRGB8888 || + fb->drm_format ==DRM_FORMAT_XRGB2101010 || + fb->drm_format ==DRM_FORMAT_XBGR8888 || + fb->drm_format ==DRM_FORMAT_XBGR2101010 ); ptr =igt_fb_map_buffer (fb->fd, fb);igt_assert (ptr);
@@ -334,7 +341,8 @@ static void writeback_sequence(igt_output_t *output, igt_plane_t *plane,uint32_t clear_color =0xffffffff ;igt_crc_t cleared_crc, out_expected; -if (fourcc_color ==DRM_FORMAT_XRGB2101010 ) +if (fourcc_color ==DRM_FORMAT_XRGB2101010 || + fourcc_color ==DRM_FORMAT_XBGR2101010 ) in_fb_colors = in_fb_colors_10bits;else in_fb_colors = in_fb_colors_8bits;
@@ -420,7 +428,12 @@ static void writeback_check_output(igt_output_t *output, igt_plane_t *plane,static void do_single_commit (igt_output_t *output,igt_plane_t *plane,igt_fb_t *in_fb,igt_fb_t *out_fb) { -uint32_t in_fb_color =0xffff0000 ; +uint32_t in_fb_color; + +if (data.format ==DRM_FORMAT_XRGB8888 || data.format ==DRM_FORMAT_XBGR8888 ) + in_fb_color =0xffff0000 ; +else + in_fb_color =0x3ff00000 ;fill_fb (in_fb, in_fb_color);
Signature · 1 line
2.43.0
PATCH v6 2/8 lib/igt_fb: Validate supported formats for crc calculation
In reply to Sowmiya SAdd logic to verify that provided formats are supported before proceeding with test execution for crc calculation
v2: Reframe commit message (Kamil)
Separate lib changes in single commit (Kamil)
v4: Remove BGR2101010 format verification from
fnv1a function (Suraj)
--- lib/igt_fb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
lib/igt_fb.c +4 -2
@@ -5035,7 +5035,8 @@ int igt_fb_get_fnv1a_crc(struct igt_fb *fb, igt_crc_t *crc)if (fb->num_planes !=1 )return -EINVAL ; -if (fb->drm_format !=DRM_FORMAT_XRGB8888 && fb->drm_format !=DRM_FORMAT_XRGB2101010 ) +if (fb->drm_format !=DRM_FORMAT_XRGB8888 && fb->drm_format !=DRM_FORMAT_XRGB2101010 && + fb->drm_format !=DRM_FORMAT_XBGR8888 )return -EINVAL ; ptr =igt_fb_map_buffer (fb->fd, fb);
@@ -5062,7 +5063,8 @@ int igt_fb_get_fnv1a_crc(struct igt_fb *fb, igt_crc_t *crc)for (x =0 ; x < fb->width; x++) {uint32_t pixel =le32_to_cpu (line[x]); -if (fb->drm_format ==DRM_FORMAT_XRGB8888 ) +if (fb->drm_format ==DRM_FORMAT_XRGB8888 || + fb->drm_format ==DRM_FORMAT_XBGR8888 ) pixel &=0x00ffffff ;else if (fb->drm_format ==DRM_FORMAT_XRGB2101010 ) pixel &=0x3fffffff ;
Signature · 1 line
2.43.0
PATCH v6 3/8 tests/kms_writeback: Update checks for zero FB ID and empty writeback commit
In reply to Sowmiya SIntel prohibits committing a framebuffer with fb_id 0 or performing an empty writeback commit. Update assertions and validation checks accordingly to reflect this restriction.
v4: Restore drm_fd added in struct and access it from
igt_display_t struct (Suraj)
v5: Revise commit message and subject with detailed
explanation. (Suraj)
v6: Revise commit message (Suraj)
--- tests/kms_writeback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tests/kms_writeback.c +3 -2
@@ -291,7 +291,7 @@ static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb, igt_fb_t */* Zero WRITEBACK_FB_ID */ ret =do_writeback_test (output,0 ,NULL , false); -igt_assert_eq (ret,0 ); +igt_assert_eq (ret,is_intel_device (output->display->drm_fd) ? -EINVAL :0 );/* Valid output buffer */ ret =do_writeback_test (output, valid_fb->fb_id,NULL , false);
@@ -406,7 +406,8 @@ static void writeback_check_output(igt_output_t *output, igt_plane_t *plane,/* Two commits, the second with no writeback */ out_fbs[0 ] = output_fb; -writeback_sequence (output, plane, input_fb, out_fbs,2 , fourcc_color); +if (!is_intel_device (output->display->drm_fd)) +writeback_sequence (output, plane, input_fb, out_fbs,2 , fourcc_color);/* Two commits, both with writeback */ out_fbs[1 ] = output_fb;
Signature · 1 line
2.43.0
PATCH v6 4/8 lib/igt_fb: Add helper to get bpc from DRM fourcc
In reply to Sowmiya SIntroduce igt_drm_format_get_bpc, which returns
the nominal bits per color channel (BPC) for
common RGB DRM fourcc formats.
--- lib/igt_fb.c | 33 +++++++++++++++++++++++++++++++++ lib/igt_fb.h | 1 + 2 files changed, 34 insertions(+)
lib/igt_fb.c +33 -0
@@ -5083,6 +5083,39 @@ int igt_fb_get_fnv1a_crc(struct igt_fb *fb, igt_crc_t *crc)return 0 ; } +/** +* igt_drm_format_get_bpc: Return bits-per-channel for a DRM fourcc format +* @drm_format: drm fourcc code +* +* Returns the nominal bits-per-color-channel (BPC) for the given @drm_format. +* This helper is intended for RGB formats and currently covers common packed +* and planar RGB(A/X) variants. Non-RGB formats are not yet handled. +* Extend as needed to cover additional FOURCCs (including YUV) by +* adding explicit cases. +*/ +int igt_drm_format_get_bpc (uint32_t drm_format) +{ +switch (drm_format) { +case DRM_FORMAT_XRGB8888 : +case DRM_FORMAT_ARGB8888 : +case DRM_FORMAT_XBGR8888 : +case DRM_FORMAT_ABGR8888 : +return 8 ; +case DRM_FORMAT_XRGB2101010 : +case DRM_FORMAT_ARGB2101010 : +case DRM_FORMAT_XBGR2101010 : +case DRM_FORMAT_ABGR2101010 : +return 10 ; +case DRM_FORMAT_XRGB16161616F : +case DRM_FORMAT_XBGR16161616F : +case DRM_FORMAT_ARGB16161616F : +case DRM_FORMAT_ABGR16161616F : +return 16 ; +default : +return -1 ; + } +} +/** * igt_format_is_yuv: * @drm_format: drm fourcc
lib/igt_fb.h +1 -0
@@ -222,6 +222,7 @@ int igt_cairo_printf_line(cairo_t *cr, enum igt_text_align align,/* helpers to handle drm fourcc codes */ uint32_t igt_bpp_depth_to_drm_format (int bpp,int depth);uint32_t igt_drm_format_to_bpp (uint32_t drm_format); +int igt_drm_format_get_bpc (uint32_t drm_format);const char *igt_format_str (uint32_t drm_format);bool igt_fb_supported_format (uint32_t drm_format);bool igt_format_is_yuv (uint32_t drm_format);
Signature · 1 line
2.43.0
RE: [PATCH i-g-t v6 4/8] lib/igt_fb: Add helper to get bpc from DRM fourcc
Quoted 6 lines
Subject: [PATCH i-g-t v6 4/8]
lib/igt_fb: Add helper to get bpc from DRM fourccIntroduce
igt_drm_format_get_bpc, which returns the nominal bits per color channel (BPC) for common RGB DRM fourcc formats.Signed-off-by Sowmiya S <[email protected]>
LGTM,
Quoted 64 lines
--- lib/igt_fb.c | 33 +++++++++++++++++++++++++++++++++ lib/igt_fb.h | 1 + 2 files changed, 34 insertions(+)lib/igt_fb.c +6
-0@@ -5083,6 +5083,39 @@ int igt_fb_get_fnv1a_crc(struct igt_fb *fb, igt_crc_t *crc)return 0 ; } +/** +* igt_drm_format_get_bpc: Return bits-per-channel for a DRM fourcc +format +* @drm_format: drm fourcc code +* +* Returns the nominal bits-per-color-channel (BPC) for the given @drm_format.
+ * This helper is intended for RGB formats and currently covers commonlib/igt_fb.c +27
-0+packed +* and planar RGB(A/X) variants. Non-RGB formats are not yet handled. +* Extend as needed to cover additional FOURCCs (including YUV) by +* adding explicit cases. +*/ +int igt_drm_format_get_bpc (uint32_t drm_format) { +switch (drm_format) { +case DRM_FORMAT_XRGB8888 : +case DRM_FORMAT_ARGB8888 : +case DRM_FORMAT_XBGR8888 : +case DRM_FORMAT_ABGR8888 : +return 8 ; +case DRM_FORMAT_XRGB2101010 : +case DRM_FORMAT_ARGB2101010 : +case DRM_FORMAT_XBGR2101010 : +case DRM_FORMAT_ABGR2101010 : +return 10 ; +case DRM_FORMAT_XRGB16161616F : +case DRM_FORMAT_XBGR16161616F : +case DRM_FORMAT_ARGB16161616F : +case DRM_FORMAT_ABGR16161616F : +return 16 ; +default : +return -1 ; + } +} +/** * igt_format_is_yuv: * @drm_format: drm fourcc lib/igt_fb.h +0
-0@@ -222,6 +222,7 @@ int igt_cairo_printf_line(cairo_t *cr, enum igt_text_align align,/* helpers to handle drm fourcc codes */ uint32_t
igt_bpp_depth_to_drm_format(int bpp, int depth);uint32_tigt_drm_format_to_bpp(uint32_t drm_format);
+intigt_drm_format_get_bpc(uint32_t drm_format);
const char *igt_format_str(uint32_tdrm_format); booligt_fb_supported_format(uint32_t drm_format); booligt_format_is_yuv(uint32_t drm_format);
--
2.43.0
PATCH v6 5/8 tests/kms_writeback: Refactor format handling in commit_and_dump_fb
In reply to Sowmiya SModify commit_and_dump_fb to select supported formats if provided; Apply default format based on the platform when none are specified.
v4: Add get format function to assign format
based on vendor type as a default format. (Suraj)
v5: Change function name more descriptive (Suraj)
v6: Revise function name (Suraj)
Refactor get format function based on BPC
--- tests/kms_writeback.c | 59 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 6 deletions(-)
tests/kms_writeback.c +53 -6
@@ -101,6 +101,26 @@ const uint32_t fourcc[] = { DRM_FORMAT_XBGR2101010, }; +enum bits_per_channel { +BPC_8 =8 , +BPC_10 =10 , +}; + +static uint32_t get_default_fb_format (igt_display_t *display,enum bits_per_channel bpc) +{ +/* Fail loudly if the enum is out of range */ +igt_assert (bpc ==BPC_8 || bpc ==BPC_10 ); + +if (bpc ==BPC_8 ) +return is_intel_device (display->drm_fd) ? +DRM_FORMAT_XBGR8888 :DRM_FORMAT_XRGB8888 ; + +if (bpc ==BPC_10 ) +return is_intel_device (display->drm_fd) ? +DRM_FORMAT_XBGR2101010 :DRM_FORMAT_XRGB2101010 ; +return -1 ; +} +static bool check_writeback_config (igt_display_t *display,igt_output_t *output,drmModeModeInfo override_mode) {
@@ -447,7 +467,7 @@ static void do_single_commit(igt_output_t *output, igt_plane_t *plane, igt_fb_t }static void commit_and_dump_fb (igt_display_t *display,igt_output_t *output,igt_plane_t *plane, -igt_fb_t *input_fb,drmModeModeInfo *mode) +igt_fb_t *input_fb,drmModeModeInfo *mode) {cairo_surface_t *fb_surface_out;char filepath_out[PATH_MAX ];
@@ -456,12 +476,37 @@ static void commit_and_dump_fb(igt_display_t *display, igt_output_t *output, igtchar *file_name;unsigned int fb_id;igt_fb_t output_fb; +uint32_t format; path_name =getenv ("IGT_FRAME_DUMP_PATH" ); file_name =getenv ("FRAME_PNG_FILE_NAME" ); +if (!data.wb_fmt) { + format =get_default_fb_format (display,BPC_8 ); + }else { +drmModePropertyBlobRes *formats_blob; + + formats_blob =igt_get_writeback_formats_blob (output); +igt_assert_f (formats_blob,"No writeback pixel formats\n" ); +igt_assert (!(formats_blob->length %4 )); +for (int i =0 ; i < formats_blob->length; i++) { + format = ((uint32_t *)formats_blob->data)[i]; +// Skip zero or unknown formats +if (format ==0 ||strcmp (igt_format_str (format),"invalid" ) ==0 ) { + format =0 ; +continue ; + } +igt_debug ("Supported writeback format: %s\n" ,igt_format_str (format)); +if (format == data.format) +break ; + format =0 ; + } +drmModeFreePropertyBlob (formats_blob); + } +igt_assert_f (format,"Given format not supported\n" ); + fb_id =igt_create_fb (display->drm_fd, mode->hdisplay, mode->vdisplay, - data.wb_fmt ? data.format :DRM_FORMAT_XRGB8888 , + format,igt_fb_mod_to_tiling (0 ), &output_fb);igt_require (fb_id >0 );
@@ -584,15 +629,16 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) fb_id =igt_create_fb (display.drm_fd, mode.hdisplay, mode.vdisplay, -DRM_FORMAT_XRGB8888 , +get_default_fb_format (&display,BPC_8 ),DRM_FORMAT_MOD_LINEAR , &input_fb);igt_assert (fb_id >=0 ); -if (data.supported_colors &XRGB2101010 ) { +if (data.supported_colors &XRGB2101010 || + data.supported_colors &XBGR2101010 ) { fb_id =igt_create_fb (display.drm_fd, mode.hdisplay, mode.vdisplay, -DRM_FORMAT_XRGB2101010 , +get_default_fb_format (&display,BPC_10 ),DRM_FORMAT_MOD_LINEAR , &input_fb_10bit);igt_assert (fb_id >=0 );
@@ -725,7 +771,8 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)cleanup_writeback (&display, output);igt_remove_fb (display.drm_fd, &input_fb); -if (data.supported_colors &XRGB2101010 ) +if (data.supported_colors &XRGB2101010 || + data.supported_colors &XBGR2101010 )igt_remove_fb (display.drm_fd, &input_fb_10bit);igt_display_fini (&display);
Signature · 1 line
2.43.0
PATCH v6 6/8 tests/kms_writeback: Refactor writeback-fb-id subtest
In reply to Sowmiya SRemove individual tests for each format for the test writeback-fb-id and introduce dynamic subtest generation based on the formats supported. Framebuffer creation was now part of the subtest level based on format.
v4: squashed the FB creation function with this commit (Suraj)
v5: -Update dynamic subtest documentation (Suraj)
-Rename input_fb to in_fb
-Set plane to in_fb and remove unused input_fb as an arg to
writeback-fb-id function.
v6: -Remove in_fb inside subtest and reuse input_fb from
fixture (Suraj)
--- tests/kms_writeback.c | 60 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 35 deletions(-)
tests/kms_writeback.c +25 -35
@@ -51,9 +51,6 @@* SUBTEST: writeback-check-output * Description: Check writeback output with CRC validation * -* SUBTEST: writeback-fb-id-XRGB2101010 -* Description: Validate WRITEBACK_FB_ID with valid and invalid options -* * SUBTEST: writeback-fb-id * Description: Validate WRITEBACK_FB_ID with valid and invalid options *
@@ -300,7 +297,7 @@ static void test_invalid_parameters(igt_output_t *output, igt_fb_t *valid_fb, ig } } -static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb,igt_fb_t *invalid_fb) +static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb) {int ret;
@@ -700,37 +697,30 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) }igt_describe ("Validate WRITEBACK_FB_ID with valid and invalid options" ); - igt_subtest("writeback-fb-id") { -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 , -DRM_FORMAT_MOD_LINEAR , - &output_fb); -igt_require (fb_id >0 ); - -writeback_fb_id (output, &input_fb, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); - } - -igt_describe ("Validate XRGB2101010 WRITEBACK_FB_ID with valid and invalid options" ); - igt_subtest("writeback-fb-id-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 , -DRM_FORMAT_MOD_LINEAR , - &output_fb); -igt_require (fb_id >0 ); - -writeback_fb_id (output, &input_fb_10bit, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); + igt_subtest_with_dynamic_f("writeback-fb-id") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; +int bpc =igt_drm_format_get_bpc (test_format); + +if (is_intel_device (display.drm_fd)) +if (!strstr (igt_format_str (test_format),"BGR" )) +continue ; + igt_dynamic_f("writeback-fb-id-%s", igt_format_str(test_format)) { +igt_fb_t output_fb; + + fb_id =igt_create_fb (display.drm_fd, mode.hdisplay, mode.vdisplay, +get_default_fb_format (&display, bpc), +igt_fb_mod_to_tiling (0 ), + &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)); +writeback_fb_id (output, &output_fb); +igt_remove_fb (display.drm_fd, &output_fb); + } + } }igt_describe ("Check writeback output with CRC validation" );
Signature · 1 line
2.43.0
RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Quoted 25 lines
Subject: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Remove individual tests for each format for the test writeback-fb-id and introduce dynamic subtest generation based on the formats supported. Framebuffer creation was now part of the subtest level based on format.
v4: squashed the FB creation function with this commit (Suraj)
v5: -Update dynamic subtest documentation (Suraj)
-Renameinput_fbtoin_fb
-Set plane toin_fband remove unusedinput_fbas an arg to
writeback-fb-id function.
v6: -Removein_fbinside subtest and reuseinput_fbfrom
fixture (Suraj)Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 60 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 35 deletions(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
63917bf4f..0ed86c865100644
tests/kms_writeback.c line 54
Quoted 7 lines
tests/kms_writeback.c +0
-3@@ -51,9 +51,6 @@* SUBTEST: writeback-check-output * Description: Check writeback output with CRC validation * -* SUBTEST: writeback-fb-id-XRGB2101010 -* Description: Validate WRITEBACK_FB_ID with valid and invalid options -* * SUBTEST: writeback-fb-id
This is the an example of the documentation that needs to be done for dynamic tests
* SUBTEST: %s
* Description: Test content protection with %arg[1]
*
* arg[1]:
*
* @atomic: atomic modesetting * @atomic-dpms: DPMS ON/OFF during atomic modesetting. * @legacy: legacy style commit * @type1: content type 1 that can be handled only through HDCP2.2.
* @suspend-resume: Suspend and resume the system
* @legacy-hdcp14: Test HDCP1.4 content protection with legacy style commit.
* @atomic-hdcp14: Test HDCP1.4 content protection with atomic modesetting.
* @atomic-dpms-hdcp14: Test HDCP1.4 content protection with atomic modesetting and DPMS.
Regards,
Suraj Kandpal
Quoted 90 lines
tests/kms_writeback.c +1
-1* Description: Validate WRITEBACK_FB_ID with valid and invalid options * @@ -300,7 +297,7 @@ static void test_invalid_parameters(igt_output_t *output, igt_fb_t *valid_fb, ig } } -static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb,igt_fb_t *invalid_fb) +static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb) {tests/kms_writeback.c +9
-31int ret;@@ -700,37 +697,30 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) }igt_describe ("Validate WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id") { -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 , -DRM_FORMAT_MOD_LINEAR , - &output_fb); -igt_require (fb_id >0 ); - -writeback_fb_id (output, &input_fb, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); - } - - igt_describe("Validate XRGB2101010 WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id-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, - DRM_FORMAT_MOD_LINEAR, - &output_fb); - igt_require(fb_id > 0); - - writeback_fb_id(output, &input_fb_10bit, &output_fb); - - igt_remove_fb(display.drm_fd, &output_fb); + igt_subtest_with_dynamic_f("writeback-fb-id") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; +int bpc =igt_drm_format_get_bpc (test_format); + +if (is_intel_device (display.drm_fd)) +if (!strstr (igt_format_str (test_format),"BGR" )) +continue ; + igt_dynamic_f("writeback-fb-id-%s",
igt_format_str(test_format)) {tests/kms_writeback.c +3
-0+igt_fb_t output_fb; + + fb_id = igt_create_fb(display.drm_fd,mode.hdisplay, mode.vdisplay,
+get_default_fb_format(&display, bpc),tests/kms_writeback.c +4
-0+igt_fb_mod_to_tiling (0 ), + &output_fb); + + igt_skip_on(data.dump_check ||data.list_modes);
tests/kms_writeback.c +1
-0+ igt_skip_on_f(!(data.supported_colors & (1 <<i)),
tests/kms_writeback.c +1
-0+ "DRM_FORMAT_%s is notsupported\n",
tests/kms_writeback.c +5
-1+ igt_format_str(test_format)); +writeback_fb_id (output, &output_fb); +igt_remove_fb (display.drm_fd, &output_fb); + } + } }igt_describe ("Check writeback output with CRC validation" ); --2.43.0
RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Hi Suraj,
Quoted 62 lines
-----Original Message-----
From: Kandpal, Suraj <[email protected]>
Sent: 19 January 2026 10:28
To: S, Sowmiya <[email protected]>; [email protected]
Cc: Sharma, Swati2 <[email protected]>
Subject: RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtestQuoted 31 lines
Subject: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Remove individual tests for each format for the test writeback-fb-id and introduce dynamic subtest generation based on the formats supported. Framebuffer creation was now part of the subtest level based on format.
v4: squashed the FB creation function with this commit (Suraj)
v5: -Update dynamic subtest documentation (Suraj)
-Renameinput_fbtoin_fb
-Set plane toin_fband remove unusedinput_fbas an arg to
writeback-fb-id function.
v6: -Removein_fbinside subtest and reuseinput_fbfrom
fixture (Suraj)Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 60 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 35 deletions(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
63917bf4f..0ed86c865100644tests/kms_writeback.c +0
-2@@ -51,9 +51,6 @@* SUBTEST: writeback-check-output * Description: Check writeback output with CRC validation * -* SUBTEST: writeback-fb-id-XRGB2101010 -* Description: Validate WRITEBACK_FB_ID with valid and invalid Quoted 3 lines
options
- *
* SUBTEST: writeback-fb-idThis is the an example of the documentation that needs to be done for dynamic tests
* SUBTEST: %s
* Description: Test content protection with %arg[1]
*
* arg[1]:
** @atomic: atomic modesetting * @atomic-dpms: DPMS ON/OFF during atomic modesetting. * @legacy: legacy style commit * @type1: content type 1 that can be handled only through HDCP2.2.* @suspend-resume: Suspend and resume the system
* @legacy-hdcp14: Test HDCP1.4 content protection with legacy style commit.
* @atomic-hdcp14: Test HDCP1.4 content protection with atomic
modesetting.
* @atomic-dpms-hdcp14: Test HDCP1.4 content protection with atomic
modesetting and DPMS.
Quoted 3 lines
Regards,
Suraj Kandpal
Here we have one subtest "writeback-check-output" under that two dynamic subtest will be listing "writeback-check-output-XBGR8888" and "writeback-check-output-XBGR2101010". It is enough to add documentation for subtest not required for dynamic subtest.
Regards,
Sowmiya
Quoted 91 lines
Quoted 91 lines
* Description: Validate
WRITEBACK_FB_IDwith valid and invalid options *tests/kms_writeback.c +0
-1@@ -300,7 +297,7 @@ static void test_invalid_parameters(igt_output_t *output, igt_fb_t *valid_fb, ig } } -static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb,
igt_fb_t*invalid_fb)tests/kms_writeback.c +10
-31+static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb) {int ret;@@ -700,37 +697,30 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) }igt_describe ("Validate WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id") { -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 , -DRM_FORMAT_MOD_LINEAR , - &output_fb); -igt_require (fb_id >0 ); - -writeback_fb_id (output, &input_fb, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); - } - - igt_describe("Validate XRGB2101010 WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id-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, - DRM_FORMAT_MOD_LINEAR, - &output_fb); - igt_require(fb_id > 0); - - writeback_fb_id(output, &input_fb_10bit, &output_fb); - - igt_remove_fb(display.drm_fd, &output_fb); + igt_subtest_with_dynamic_f("writeback-fb-id") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; +int bpc =igt_drm_format_get_bpc (test_format); + +if (is_intel_device (display.drm_fd)) +if (!strstr (igt_format_str (test_format),"BGR" )) +continue ; + igt_dynamic_f("writeback-fb-id-%s",
igt_format_str(test_format)) {tests/kms_writeback.c +3
-0+igt_fb_t output_fb; + + fb_id = igt_create_fb(display.drm_fd,mode.hdisplay, mode.vdisplay,
+get_default_fb_format(&display, bpc),tests/kms_writeback.c +4
-0+igt_fb_mod_to_tiling (0 ), + &output_fb); + + igt_skip_on(data.dump_check ||data.list_modes);
tests/kms_writeback.c +1
-0+ igt_skip_on_f(!(data.supported_colors & (1 <<i)),
tests/kms_writeback.c +1
-0+ "DRM_FORMAT_%s is notsupported\n",
tests/kms_writeback.c +5
-1+ igt_format_str(test_format)); +writeback_fb_id (output, &output_fb); +igt_remove_fb (display.drm_fd, &output_fb); + } + } }igt_describe ("Check writeback output with CRC validation" ); --2.43.0
RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Quoted 76 lines
-----Original Message-----
From: S, Sowmiya <[email protected]>
Sent: Monday, January 19, 2026 10:47 AM
To: Kandpal, Suraj <[email protected]>; [email protected]
Cc: Sharma, Swati2 <[email protected]>
Subject: RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb- id subtestHi Suraj,
Quoted 13 lines
-----Original Message-----
From: Kandpal, Suraj <[email protected]>
Sent: 19 January 2026 10:28
To: S, Sowmiya <[email protected]>; [email protected]
Cc: Sharma, Swati2 <[email protected]>
Subject: RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtestQuoted 5 lines
Subject: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Remove individual tests for each format for the test writeback-fb-id and introduce dynamic subtest generation based on the formats
supported.
Quoted 38 lines
Quoted 26 lines
Framebuffer creation was now part of the subtest level based on format.
v4: squashed the FB creation function with this commit (Suraj)
v5: -Update dynamic subtest documentation (Suraj)
-Renameinput_fbtoin_fb
-Set plane toin_fband remove unusedinput_fbas an arg to
writeback-fb-id function.
v6: -Removein_fbinside subtest and reuseinput_fbfrom
fixture (Suraj)Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 60 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 35 deletions(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
63917bf4f..0ed86c865100644tests/kms_writeback.c +0
-2@@ -51,9 +51,6 @@* SUBTEST: writeback-check-output * Description: Check writeback output with CRC validation * -* SUBTEST: writeback-fb-id-XRGB2101010 -* Description: Validate WRITEBACK_FB_ID with valid and invalid Quoted 3 lines
options
- *
* SUBTEST: writeback-fb-idThis is the an example of the documentation that needs to be done for dynamic tests
* SUBTEST: %s
* Description: Test content protection with %arg[1]
*
* arg[1]:
*Quoted 6 lines
* @atomic: atomic modesetting * @atomic-dpms: DPMS ON/OFF during atomic modesetting. * @legacy: legacy style commit * @type1: content type 1 that can be handled only through HDCP2.2.* @suspend-resume: Suspend and resume the system
* @legacy-hdcp14: Test HDCP1.4 content protection with legacy stylecommit.
Quoted 5 lines
* @atomic-hdcp14: Test HDCP1.4 content protection with atomic
modesetting.
* @atomic-dpms-hdcp14: Test HDCP1.4 content protection with atomic
modesetting and DPMS.
Quoted 9 lines
Quoted 3 lines
Regards,
Suraj KandpalHere we have one subtest "writeback-check-output" under that two dynamic subtest will be listing "writeback-check-output-XBGR8888" and "writeback- check-output-XBGR2101010". It is enough to add documentation for subtest not required for dynamic subtest.
Hmm okay.
Quoted 95 lines
Regards,
SowmiyaQuoted 92 lines
Quoted 92 lines
* Description: Validate
WRITEBACK_FB_IDwith valid and invalid options *tests/kms_writeback.c +11
-32@@ -300,7 +297,7 @@ static void test_invalid_parameters(igt_output_t *output, igt_fb_t *valid_fb, ig } } -static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb, igt_fb_t *invalid_fb) +static void writeback_fb_id (igt_output_t *output,igt_fb_t +*valid_fb) {int ret;@@ -700,37 +697,30 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) }igt_describe ("Validate WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id") { -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 , -DRM_FORMAT_MOD_LINEAR , - &output_fb); -igt_require (fb_id >0 ); - -writeback_fb_id (output, &input_fb, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); - } - - igt_describe("Validate XRGB2101010 WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id-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, - DRM_FORMAT_MOD_LINEAR, - &output_fb); - igt_require(fb_id > 0); - - writeback_fb_id(output, &input_fb_10bit, &output_fb); - - igt_remove_fb(display.drm_fd, &output_fb); + igt_subtest_with_dynamic_f("writeback-fb-id") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; +int bpc =igt_drm_format_get_bpc (test_format); + +if (is_intel_device (display.drm_fd)) +if (!strstr (igt_format_str (test_format),"BGR" )) +continue ; + igt_dynamic_f("writeback-fb-id-%s",
igt_format_str(test_format)) {tests/kms_writeback.c +3
-0+igt_fb_t output_fb; + + fb_id = igt_create_fb(display.drm_fd,mode.hdisplay, mode.vdisplay,
+get_default_fb_format(&display, bpc),tests/kms_writeback.c +4
-0+igt_fb_mod_to_tiling (0 ), + &output_fb); + + igt_skip_on(data.dump_check ||data.list_modes);
tests/kms_writeback.c +1
-0+ igt_skip_on_f(!(data.supported_colors & (1 <<i)),
tests/kms_writeback.c +1
-0+ "DRM_FORMAT_%s is notsupported\n",
tests/kms_writeback.c +5
-1+ igt_format_str(test_format)); +writeback_fb_id (output, &output_fb); +igt_remove_fb (display.drm_fd, &output_fb); + } + } }igt_describe ("Check writeback output with CRC validation" ); --2.43.0
RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
In reply to Sowmiya SQuoted 35 lines
Subject: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Remove individual tests for each format for the test writeback-fb-id and introduce dynamic subtest generation based on the formats supported. Framebuffer creation was now part of the subtest level based on format.
v4: squashed the FB creation function with this commit (Suraj)
v5: -Update dynamic subtest documentation (Suraj)
-Renameinput_fbtoin_fb
-Set plane toin_fband remove unusedinput_fbas an arg to
writeback-fb-id function.
v6: -Removein_fbinside subtest and reuseinput_fbfrom
fixture (Suraj)Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 60 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 35 deletions(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
63917bf4f..0ed86c865100644tests/kms_writeback.c +0
-3@@ -51,9 +51,6 @@* SUBTEST: writeback-check-output * Description: Check writeback output with CRC validation * -* SUBTEST: writeback-fb-id-XRGB2101010 -* Description: Validate WRITEBACK_FB_ID with valid and invalid options -* * SUBTEST: writeback-fb-id * Description: Validate WRITEBACK_FB_ID with valid and invalid options *
tests/kms_writeback.c static void test_invalid_parameters(igt_output_t · line 302
Quoted 7 lines
tests/kms_writeback.c +1
-1@@ -300,7 +297,7 @@ static void test_invalid_parameters(igt_output_t *output, igt_fb_t *valid_fb, ig } } -static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb,igt_fb_t *invalid_fb) +static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb)
Also you changing the argument should be its separate patch with a fixes tag mentioning You are removing the argument because it is not used.
Quoted 42 lines
tests/kms_writeback.c +0
-0{tests/kms_writeback.c +0
-28int ret;@@ -700,37 +697,30 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) }igt_describe ("Validate WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id") { -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 , -DRM_FORMAT_MOD_LINEAR , - &output_fb); -igt_require (fb_id >0 ); - -writeback_fb_id (output, &input_fb, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); - } - - igt_describe("Validate XRGB2101010 WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id-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, - DRM_FORMAT_MOD_LINEAR, - &output_fb); - igt_require(fb_id > 0); -
tests/kms_writeback.c int igt_main_args("b:c:f:dl", long_options, help_str, · line 706
Quoted 10 lines
tests/kms_writeback.c +7
-3-writeback_fb_id (output, &input_fb_10bit, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); + igt_subtest_with_dynamic_f("writeback-fb-id") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; +int bpc =igt_drm_format_get_bpc (test_format); + +if (is_intel_device (display.drm_fd)) +if (!strstr (igt_format_str (test_format),"BGR" ))
You don't need to nest these conditions and can be joined with &&
Regards,
Suraj Kandpal
Quoted 28 lines
tests/kms_writeback.c +2
-0+continue ; + igt_dynamic_f("writeback-fb-id-%s",
igt_format_str(test_format)) {tests/kms_writeback.c +3
-0+igt_fb_t output_fb; + + fb_id = igt_create_fb(display.drm_fd,mode.hdisplay, mode.vdisplay,
+get_default_fb_format(&display, bpc),tests/kms_writeback.c +4
-0+igt_fb_mod_to_tiling (0 ), + &output_fb); + + igt_skip_on(data.dump_check ||data.list_modes);
tests/kms_writeback.c +1
-0+ igt_skip_on_f(!(data.supported_colors & (1 <<i)),
tests/kms_writeback.c +1
-0+ "DRM_FORMAT_%s is notsupported\n",
tests/kms_writeback.c +5
-1+ igt_format_str(test_format)); +writeback_fb_id (output, &output_fb); +igt_remove_fb (display.drm_fd, &output_fb); + } + } }igt_describe ("Check writeback output with CRC validation" ); --2.43.0
RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Hi Suraj,
Quoted 49 lines
-----Original Message-----
From: Kandpal, Suraj <[email protected]>
Sent: 19 January 2026 10:37
To: S, Sowmiya <[email protected]>; [email protected]
Cc: Sharma, Swati2 <[email protected]>
Subject: RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtestQuoted 41 lines
Subject: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Remove individual tests for each format for the test writeback-fb-id and introduce dynamic subtest generation based on the formats supported. Framebuffer creation was now part of the subtest level based on format.
v4: squashed the FB creation function with this commit (Suraj)
v5: -Update dynamic subtest documentation (Suraj)
-Renameinput_fbtoin_fb
-Set plane toin_fband remove unusedinput_fbas an arg to
writeback-fb-id function.
v6: -Removein_fbinside subtest and reuseinput_fbfrom
fixture (Suraj)Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 60 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 35 deletions(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
63917bf4f..0ed86c865100644tests/kms_writeback.c +0
-2@@ -51,9 +51,6 @@* SUBTEST: writeback-check-output * Description: Check writeback output with CRC validation * -* SUBTEST: writeback-fb-id-XRGB2101010 -* Description: Validate WRITEBACK_FB_ID with valid and invalid options
- *
* SUBTEST: writeback-fb-id
* Description: ValidateWRITEBACK_FB_IDwith valid and invalid options *tests/kms_writeback.c +0
-0@@ -300,7 +297,7 @@ static void test_invalid_parameters(igt_output_t *output, igt_fb_t *valid_fb, ig } }
Quoted 8 lines
Quoted 4 lines
tests/kms_writeback.c +0
-1-static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb,
igt_fb_t*invalid_fb)
+static voidwriteback_fb_id(igt_output_t *output, igt_fb_t *valid_fb)Also you changing the argument should be its separate patch with a fixes tag mentioning You are removing the argument because it is not used.
I'll handle the parameter removal in a separate patch.
Regards,
Sowmiya
Quoted 46 lines
Quoted 46 lines
{
tests/kms_writeback.c +1
-31int ret;@@ -700,37 +697,30 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) }igt_describe ("Validate WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id") { -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 , -DRM_FORMAT_MOD_LINEAR , - &output_fb); -igt_require (fb_id >0 ); - -writeback_fb_id (output, &input_fb, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); - } - - igt_describe("Validate XRGB2101010 WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id-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, - DRM_FORMAT_MOD_LINEAR, - &output_fb); - igt_require(fb_id > 0); - - writeback_fb_id(output, &input_fb_10bit, &output_fb); - - igt_remove_fb(display.drm_fd, &output_fb); + igt_subtest_with_dynamic_f("writeback-fb-id") {
Quoted 9 lines
tests/kms_writeback.c int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) · line 706
Quoted 6 lines
tests/kms_writeback.c +6
-0+for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; +int bpc =igt_drm_format_get_bpc (test_format); + +if (is_intel_device (display.drm_fd)) +if (!strstr (igt_format_str (test_format),"BGR" ))You don't need to nest these conditions and can be joined with &&
Yes, will do that.
Quoted 33 lines
Regards,
Suraj KandpalQuoted 28 lines
tests/kms_writeback.c +2
-0+continue ; + igt_dynamic_f("writeback-fb-id-%s",
igt_format_str(test_format)) {tests/kms_writeback.c +3
-0+igt_fb_t output_fb; + + fb_id = igt_create_fb(display.drm_fd,mode.hdisplay, mode.vdisplay,
+get_default_fb_format(&display, bpc),tests/kms_writeback.c +4
-0+igt_fb_mod_to_tiling (0 ), + &output_fb); + + igt_skip_on(data.dump_check ||data.list_modes);
tests/kms_writeback.c +1
-0+ igt_skip_on_f(!(data.supported_colors & (1 <<i)),
tests/kms_writeback.c +1
-0+ "DRM_FORMAT_%s is notsupported\n",
tests/kms_writeback.c +5
-1+ igt_format_str(test_format)); +writeback_fb_id (output, &output_fb); +igt_remove_fb (display.drm_fd, &output_fb); + } + } }igt_describe ("Check writeback output with CRC validation" ); --2.43.0
RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
In reply to Sowmiya SQuoted 112 lines
Subject: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Remove individual tests for each format for the test writeback-fb-id and introduce dynamic subtest generation based on the formats supported. Framebuffer creation was now part of the subtest level based on format.
v4: squashed the FB creation function with this commit (Suraj)
v5: -Update dynamic subtest documentation (Suraj)
-Renameinput_fbtoin_fb
-Set plane toin_fband remove unusedinput_fbas an arg to
writeback-fb-id function.
v6: -Removein_fbinside subtest and reuseinput_fbfrom
fixture (Suraj)Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 60 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 35 deletions(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
63917bf4f..0ed86c865100644tests/kms_writeback.c +1
-4@@ -51,9 +51,6 @@* SUBTEST: writeback-check-output * Description: Check writeback output with CRC validation * -* SUBTEST: writeback-fb-id-XRGB2101010 -* Description: Validate WRITEBACK_FB_ID with valid and invalid options -* * SUBTEST: writeback-fb-id * Description: Validate WRITEBACK_FB_ID with valid and invalid options * @@ -300,7 +297,7 @@ static void test_invalid_parameters(igt_output_t *output, igt_fb_t *valid_fb, ig } } -static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb,igt_fb_t *invalid_fb) +static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb) {tests/kms_writeback.c +9
-31int ret;@@ -700,37 +697,30 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) }igt_describe ("Validate WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id") { -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 , -DRM_FORMAT_MOD_LINEAR , - &output_fb); -igt_require (fb_id >0 ); - -writeback_fb_id (output, &input_fb, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); - } - - igt_describe("Validate XRGB2101010 WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id-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, - DRM_FORMAT_MOD_LINEAR, - &output_fb); - igt_require(fb_id > 0); - - writeback_fb_id(output, &input_fb_10bit, &output_fb); - - igt_remove_fb(display.drm_fd, &output_fb); + igt_subtest_with_dynamic_f("writeback-fb-id") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; +int bpc =igt_drm_format_get_bpc (test_format); + +if (is_intel_device (display.drm_fd)) +if (!strstr (igt_format_str (test_format),"BGR" )) +continue ; + igt_dynamic_f("writeback-fb-id-%s",
igt_format_str(test_format)) {tests/kms_writeback.c +3
-0+igt_fb_t output_fb; + + fb_id = igt_create_fb(display.drm_fd,mode.hdisplay, mode.vdisplay,
+get_default_fb_format(&display, bpc),tests/kms_writeback.c +4
-0+igt_fb_mod_to_tiling (0 ), + &output_fb); + + igt_skip_on(data.dump_check ||data.list_modes);
tests/kms_writeback.c +1
-0+ igt_skip_on_f(!(data.supported_colors & (1 <<i)),
tests/kms_writeback.c +1
-0+ "DRM_FORMAT_%s is notsupported\n",
tests/kms_writeback.c int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) · line 720
Quoted 2 lines
tests/kms_writeback.c +2
-0+ igt_format_str(test_format)); +writeback_fb_id (output, &output_fb);
You have also started using output fb as valid fb we previously used input_fb as valid fb please be mindful of your Changes and mention these changes and why they are needed.
Regards,
Suraj Kandpal
Quoted 8 lines
tests/kms_writeback.c +3
-1+igt_remove_fb (display.drm_fd, &output_fb); + } + } }igt_describe ("Check writeback output with CRC validation" ); --2.43.0
RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Hi Suraj,
Quoted 130 lines
-----Original Message-----
From: Kandpal, Suraj <[email protected]>
Sent: 19 January 2026 10:42
To: S, Sowmiya <[email protected]>; [email protected]
Cc: Sharma, Swati2 <[email protected]>
Subject: RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtestQuoted 115 lines
Subject: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Remove individual tests for each format for the test writeback-fb-id and introduce dynamic subtest generation based on the formats supported. Framebuffer creation was now part of the subtest level based on format.
v4: squashed the FB creation function with this commit (Suraj)
v5: -Update dynamic subtest documentation (Suraj)
-Renameinput_fbtoin_fb
-Set plane toin_fband remove unusedinput_fbas an arg to
writeback-fb-id function.
v6: -Removein_fbinside subtest and reuseinput_fbfrom
fixture (Suraj)Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 60 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 35 deletions(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
63917bf4f..0ed86c865100644tests/kms_writeback.c +0
-2@@ -51,9 +51,6 @@* SUBTEST: writeback-check-output * Description: Check writeback output with CRC validation * -* SUBTEST: writeback-fb-id-XRGB2101010 -* Description: Validate WRITEBACK_FB_ID with valid and invalid options
- *
* SUBTEST: writeback-fb-id
* Description: ValidateWRITEBACK_FB_IDwith valid and invalid options *tests/kms_writeback.c +0
-1@@ -300,7 +297,7 @@ static void test_invalid_parameters(igt_output_t *output, igt_fb_t *valid_fb, ig } } -static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb,
igt_fb_t*invalid_fb)tests/kms_writeback.c +10
-31+static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb) {int ret;@@ -700,37 +697,30 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) }igt_describe ("Validate WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id") { -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 , -DRM_FORMAT_MOD_LINEAR , - &output_fb); -igt_require (fb_id >0 ); - -writeback_fb_id (output, &input_fb, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); - } - - igt_describe("Validate XRGB2101010 WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id-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, - DRM_FORMAT_MOD_LINEAR, - &output_fb); - igt_require(fb_id > 0); - - writeback_fb_id(output, &input_fb_10bit, &output_fb); - - igt_remove_fb(display.drm_fd, &output_fb); + igt_subtest_with_dynamic_f("writeback-fb-id") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; +int bpc =igt_drm_format_get_bpc (test_format); + +if (is_intel_device (display.drm_fd)) +if (!strstr (igt_format_str (test_format),"BGR" )) +continue ; + igt_dynamic_f("writeback-fb-id-%s",
igt_format_str(test_format)) {tests/kms_writeback.c +3
-0+igt_fb_t output_fb; + + fb_id = igt_create_fb(display.drm_fd,mode.hdisplay, mode.vdisplay,
+get_default_fb_format(&display, bpc),tests/kms_writeback.c +4
-0+igt_fb_mod_to_tiling (0 ), + &output_fb); + + igt_skip_on(data.dump_check ||data.list_modes);
tests/kms_writeback.c +1
-0+ igt_skip_on_f(!(data.supported_colors & (1 <<i)),
tests/kms_writeback.c +1
-0+ "DRM_FORMAT_%s is notsupported\n",
tests/kms_writeback.c int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) · line 720
Quoted 2 lines
tests/kms_writeback.c +2
-0+ igt_format_str(test_format)); +writeback_fb_id (output, &output_fb);You have also started using output fb as valid fb we previously used
input_fbas valid fb please be mindful of your Changes and mention these changes and why they are needed.
Quoted 2 lines
Regards,
Suraj Kandpal
As of now it will use only two formats BGR/RGB 8 and 10 bits. So, I will refactor it to reuse the input FB for 8 and 10 bits accordingly.
Quoted 9 lines
Quoted 9 lines
tests/kms_writeback.c +3
-1+igt_remove_fb (display.drm_fd, &output_fb); + } + } }igt_describe ("Check writeback output with CRC validation" ); --2.43.0
RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Quoted 127 lines
Quoted 8 lines
Subject: RE: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Quoted 5 lines
Subject: [PATCH i-g-t v6 6/8] tests/kms_writeback: Refactor writeback-fb-id subtest
Remove individual tests for each format for the test writeback-fb-id and introduce dynamic subtest generation based on the formats
supported.
Quoted 118 lines
Quoted 111 lines
Framebuffer creation was now part of the subtest level based on format.
v4: squashed the FB creation function with this commit (Suraj)
v5: -Update dynamic subtest documentation (Suraj)
-Renameinput_fbtoin_fb
-Set plane toin_fband remove unusedinput_fbas an arg to
writeback-fb-id function.
v6: -Removein_fbinside subtest and reuseinput_fbfrom
fixture (Suraj)Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 60 ++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 35 deletions(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
63917bf4f..0ed86c865100644tests/kms_writeback.c +0
-2@@ -51,9 +51,6 @@* SUBTEST: writeback-check-output * Description: Check writeback output with CRC validation * -* SUBTEST: writeback-fb-id-XRGB2101010 -* Description: Validate WRITEBACK_FB_ID with valid and invalid options
- *
* SUBTEST: writeback-fb-id
* Description: ValidateWRITEBACK_FB_IDwith valid and invalid options *tests/kms_writeback.c +11
-32@@ -300,7 +297,7 @@ static void test_invalid_parameters(igt_output_t *output, igt_fb_t *valid_fb, ig } } -static void writeback_fb_id (igt_output_t *output,igt_fb_t *valid_fb, igt_fb_t *invalid_fb) +static void writeback_fb_id (igt_output_t *output,igt_fb_t +*valid_fb) {int ret;@@ -700,37 +697,30 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) }igt_describe ("Validate WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id") { -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 , -DRM_FORMAT_MOD_LINEAR , - &output_fb); -igt_require (fb_id >0 ); - -writeback_fb_id (output, &input_fb, &output_fb); - -igt_remove_fb (display.drm_fd, &output_fb); - } - - igt_describe("Validate XRGB2101010 WRITEBACK_FB_ID with valid and invalid options"); - igt_subtest("writeback-fb-id-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, - DRM_FORMAT_MOD_LINEAR, - &output_fb); - igt_require(fb_id > 0); - - writeback_fb_id(output, &input_fb_10bit, &output_fb); - - igt_remove_fb(display.drm_fd, &output_fb); + igt_subtest_with_dynamic_f("writeback-fb-id") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; +int bpc =igt_drm_format_get_bpc (test_format); + +if (is_intel_device (display.drm_fd)) +if (!strstr (igt_format_str (test_format),"BGR" )) +continue ; + igt_dynamic_f("writeback-fb-id-%s",
igt_format_str(test_format)) {tests/kms_writeback.c +3
-0+igt_fb_t output_fb; + + fb_id = igt_create_fb(display.drm_fd,mode.hdisplay, mode.vdisplay,
+get_default_fb_format(&display, bpc),tests/kms_writeback.c +4
-0+igt_fb_mod_to_tiling (0 ), + &output_fb); + + igt_skip_on(data.dump_check ||data.list_modes);
tests/kms_writeback.c +1
-0+ igt_skip_on_f(!(data.supported_colors & (1 <<i)),
tests/kms_writeback.c +1
-0+ "DRM_FORMAT_%s is notsupported\n",
tests/kms_writeback.c int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) · line 720
Quoted 2 lines
tests/kms_writeback.c +2
-0+ igt_format_str(test_format)); +writeback_fb_id (output, &output_fb);You have also started using output fb as valid fb we previously used
input_fbas valid fb please be mindful of your Changes and mention these changes and why they are needed.
Quoted 5 lines
Quoted 2 lines
Regards,
Suraj KandpalAs of now it will use only two formats BGR/RGB 8 and 10 bits. So, I will refactor it to reuse the input FB for 8 and 10 bits accordingly.
Seems fair
Regards,
Suraj Kandpal
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
tests/kms_writeback.c +3
-1+igt_remove_fb (display.drm_fd, &output_fb); + } + } }igt_describe ("Check writeback output with CRC validation" ); --2.43.0
PATCH v6 7/8 tests/kms_writeback: Refactor writeback-check-output subtest
In reply to Sowmiya SRemove 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.(Suraj)
v5: -update the documentation for dynamic subtest
-update version info (Suraj)
v6: -Remove in_fb inside subtest and reuse input_fb from
fixture (Suraj)
--- tests/kms_writeback.c | 57 +++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 32 deletions(-)
tests/kms_writeback.c +25 -32
@@ -45,11 +45,10 @@#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 +* Description: Check writeback output with CRC validation.This test ++ * dynamically generates subtests for each supported pixel ++ * format (e.g., XBGR8888) and configuration. * * SUBTEST: writeback-fb-id * Description: Validate WRITEBACK_FB_ID with valid and invalid options
@@ -712,7 +711,6 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)get_default_fb_format (&display, bpc),igt_fb_mod_to_tiling (0 ), &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",
@@ -724,38 +722,33 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL) }igt_describe ("Check writeback output with CRC validation" ); - igt_subtest("writeback-check-output") { -igt_fb_t output_fb; + igt_subtest_with_dynamic("writeback-check-output") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; -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 ); +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; +int bpc =igt_drm_format_get_bpc (test_format); -writeback_check_output (output, plane, &input_fb, &output_fb,DRM_FORMAT_XRGB8888 ); + fb_id =igt_create_fb (display.drm_fd, mode.hdisplay, mode.vdisplay, +get_default_fb_format (&display, bpc), +igt_fb_mod_to_tiling (0 ), + &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)); +writeback_check_output (output, plane, (bpc ==8 ) ? &input_fb : + &input_fb_10bit, &output_fb, test_format); +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 ); - -writeback_check_output (output, plane, &input_fb_10bit, &output_fb,DRM_FORMAT_XRGB2101010 ); - -igt_remove_fb (display.drm_fd, &output_fb); - } igt_fixture() {cleanup_writeback (&display, output);
Signature · 1 line
2.43.0
RE: [PATCH i-g-t v6 7/8] tests/kms_writeback: Refactor writeback-check-output subtest
Quoted 28 lines
Subject: [PATCH i-g-t v6 7/8] tests/kms_writeback: Refactor writeback-check- output subtest
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.(Suraj)
v5: -update the documentation for dynamic subtest
-update version info (Suraj)
v6: -Removein_fbinside subtest and reuseinput_fbfrom
fixture (Suraj)Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 57 +++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 32 deletions(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
0ed86c865..66da5603a100644tests/kms_writeback.c +0
-0@@ -45,11 +45,10 @@#include "sw_sync.h"
tests/kms_writeback.c line 52
Quoted 10 lines
tests/kms_writeback.c +3
-4/** -* SUBTEST: writeback-check-output-XRGB2101010 -* Description: Check XRGB2101010 writeback output with CRC validation -* * SUBTEST: writeback-check-output -* Description: Check writeback output with CRC validation +* Description: Check writeback output with CRC validation.This test ++ * dynamically generates subtests for each supported pixel ++ * format (e.g., XBGR8888) and configuration. *
Same as last fix documentation
Quoted 36 lines
tests/kms_writeback.c +0
-1* SUBTEST: writeback-fb-id * Description: Validate WRITEBACK_FB_ID with valid and invalid options @@ -712,7 +711,6 @@ int igt_main_args("b:c:f:dl", long_options, help_str,
opt_handler, NULL)
get_default_fb_format(&display, bpc),tests/kms_writeback.c +0
-1igt_fb_mod_to_tiling (0 ), &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", @@ -724,38 +722,33 @@ intigt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)tests/kms_writeback.c +3
-4}igt_describe ("Check writeback output with CRC validation" ); - igt_subtest("writeback-check-output") { -igt_fb_t output_fb; + igt_subtest_with_dynamic("writeback-check-output") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i]; -igt_skip_on (data.dump_check || data.list_modes); - igt_skip_on_f(!(data.supported_colors &XRGB8888),"DRM_FORMAT_XRGB8888 is unsupported\n");
tests/kms_writeback.c +0
-1- fb_id = igt_create_fb(display.drm_fd, mode.hdisplay,mode.vdisplay,
tests/kms_writeback.c +2
-4-DRM_FORMAT_XRGB8888 , -igt_fb_mod_to_tiling (0 ), - &output_fb); -igt_require (fb_id >0 ); +if (is_intel_device (display.drm_fd)) + if (!strstr(igt_format_str(test_format),
Quoted 1 line
"BGR8888"))
Join conditions with && instead of nesting
Regards,
Suraj Kandpal
Quoted 58 lines
tests/kms_writeback.c +2
-0+continue ; + igt_dynamic_f("writeback-check-output-%s",
igt_format_str(test_format)) {tests/kms_writeback.c +2
-0+igt_fb_t output_fb; + int bpc =
igt_drm_format_get_bpc(test_format);tests/kms_writeback.c +0
-1- writeback_check_output(output, plane, &input_fb,
&output_fb,DRM_FORMAT_XRGB8888);tests/kms_writeback.c +1
-0+ fb_id = igt_create_fb(display.drm_fd,mode.hdisplay, mode.vdisplay,
+get_default_fb_format(&display, bpc),tests/kms_writeback.c +3
-1+igt_fb_mod_to_tiling (0 ), + &output_fb); -igt_remove_fb (display.drm_fd, &output_fb); + igt_skip_on(data.dump_check ||data.list_modes);
tests/kms_writeback.c +1
-0+ igt_skip_on_f(!(data.supported_colors & (1 <<i)),
tests/kms_writeback.c +1
-0+ "DRM_FORMAT_%s is notsupported\n",
tests/kms_writeback.c +2
-0+ igt_format_str(test_format)); + writeback_check_output(output, plane, (bpc== 8) ?
&input_fb:tests/kms_writeback.c +1
-0+ &input_fb_10bit,
&output_fb,test_format);tests/kms_writeback.c +3
-1+igt_remove_fb (display.drm_fd, &output_fb); + } + } } - igt_describe("Check XRGB2101010 writeback output with CRCvalidation");
tests/kms_writeback.c +0
-5- 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_XRGB2101010is unsupported\n");tests/kms_writeback.c +0
-1- fb_id = igt_create_fb(display.drm_fd, mode.hdisplay,mode.vdisplay,
tests/kms_writeback.c +0
-6-DRM_FORMAT_XRGB2101010 , -igt_fb_mod_to_tiling (0 ), - &output_fb); -igt_require (fb_id >0 ); - - writeback_check_output(output, plane, &input_fb_10bit,
&output_fb,DRM_FORMAT_XRGB2101010);tests/kms_writeback.c +0
-4- -igt_remove_fb (display.drm_fd, &output_fb); - } igt_fixture() {cleanup_writeback (&display, output); --2.43.0
RE: [PATCH i-g-t v6 7/8] tests/kms_writeback: Refactor writeback-check-output subtest
Hi Suraj,
Quoted 37 lines
-----Original Message-----
From: Kandpal, Suraj <[email protected]>
Sent: 19 January 2026 10:45
To: S, Sowmiya <[email protected]>; [email protected]
Cc: Sharma, Swati2 <[email protected]>
Subject: RE: [PATCH i-g-t v6 7/8] tests/kms_writeback: Refactor writeback- check-output subtestQuoted 28 lines
Subject: [PATCH i-g-t v6 7/8] tests/kms_writeback: Refactor writeback-check- output subtest
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.(Suraj)
v5: -update the documentation for dynamic subtest
-update version info (Suraj)
v6: -Removein_fbinside subtest and reuseinput_fbfrom
fixture (Suraj)Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 57 +++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 32 deletions(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
0ed86c865..66da5603a100644tests/kms_writeback.c +0
-0@@ -45,11 +45,10 @@#include "sw_sync.h"
Quoted 13 lines
Quoted 11 lines
tests/kms_writeback.c +0
-2/** -* SUBTEST: writeback-check-output-XRGB2101010 -* Description: Check XRGB2101010 writeback output with CRC validation
- *
* SUBTEST: writeback-check-output
- * Description: Check writeback output with CRC validation
+ * Description: Check writeback output with CRC validation.This test
++ * dynamically generates subtests for each supported pixel
++ * format (e.g., XBGR8888) and configuration.
*Same as last fix documentation
Dynamic subtests do not need to be documented.
Quoted 27 lines
Quoted 12 lines
* SUBTEST: writeback-fb-id
* Description: ValidateWRITEBACK_FB_IDwith valid and invalid
options @@
-712,7 +711,6 @@ intigt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
get_default_fb_format(&display, bpc),tests/kms_writeback.c +0
-1igt_fb_mod_to_tiling (0 ), &output_fb); - igt_skip_on(data.dump_check ||Quoted 2 lines
data.list_modes);
igt_skip_on_f(!(data.supported_colors & (1 <<i)),
Quoted 12 lines
"DRM_FORMAT_%s is not
supported\n", @@ -724,38 +722,33 @@ intigt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)tests/kms_writeback.c +3
-2}igt_describe ("Check writeback output with CRC validation" ); - igt_subtest("writeback-check-output") { -igt_fb_t output_fb; + igt_subtest_with_dynamic("writeback-check-output") { +for (int i =0 ; i <ARRAY_SIZE (fourcc); i++) { +uint32_t test_format = fourcc[i];
Quoted 15 lines
Quoted 11 lines
tests/kms_writeback.c +0
-2-igt_skip_on (data.dump_check || data.list_modes); - igt_skip_on_f(!(data.supported_colors &XRGB8888),"DRM_FORMAT_XRGB8888 is unsupported\n");
tests/kms_writeback.c +0
-1- fb_id = igt_create_fb(display.drm_fd, mode.hdisplay,mode.vdisplay,
tests/kms_writeback.c +2
-4-DRM_FORMAT_XRGB8888 , -igt_fb_mod_to_tiling (0 ), - &output_fb); -igt_require (fb_id >0 ); +if (is_intel_device (display.drm_fd)) + if (!strstr(igt_format_str(test_format),Quoted 1 line
"BGR8888"))
Join conditions with && instead of nesting
I will rectify it in next rev.
Regards,
Sowmiya
Quoted 61 lines
Regards,
Suraj KandpalQuoted 58 lines
tests/kms_writeback.c +2
-0+continue ; + igt_dynamic_f("writeback-check-output-%s",
igt_format_str(test_format)) {tests/kms_writeback.c +2
-0+igt_fb_t output_fb; + int bpc =
igt_drm_format_get_bpc(test_format);tests/kms_writeback.c +0
-1- writeback_check_output(output, plane, &input_fb,
&output_fb,DRM_FORMAT_XRGB8888);tests/kms_writeback.c +1
-0+ fb_id = igt_create_fb(display.drm_fd,mode.hdisplay, mode.vdisplay,
+get_default_fb_format(&display, bpc),tests/kms_writeback.c +3
-1+igt_fb_mod_to_tiling (0 ), + &output_fb); -igt_remove_fb (display.drm_fd, &output_fb); + igt_skip_on(data.dump_check ||data.list_modes);
tests/kms_writeback.c +1
-0+ igt_skip_on_f(!(data.supported_colors & (1 <<i)),
tests/kms_writeback.c +1
-0+ "DRM_FORMAT_%s is notsupported\n",
tests/kms_writeback.c +2
-0+ igt_format_str(test_format)); + writeback_check_output(output, plane, (bpc== 8) ?
&input_fb:tests/kms_writeback.c +1
-0+ &input_fb_10bit,
&output_fb,test_format);tests/kms_writeback.c +3
-1+igt_remove_fb (display.drm_fd, &output_fb); + } + } } - igt_describe("Check XRGB2101010 writeback output with CRCvalidation");
tests/kms_writeback.c +0
-5- 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_XRGB2101010is unsupported\n");tests/kms_writeback.c +0
-1- fb_id = igt_create_fb(display.drm_fd, mode.hdisplay,mode.vdisplay,
tests/kms_writeback.c +0
-6-DRM_FORMAT_XRGB2101010 , -igt_fb_mod_to_tiling (0 ), - &output_fb); -igt_require (fb_id >0 ); - - writeback_check_output(output, plane, &input_fb_10bit,
&output_fb,DRM_FORMAT_XRGB2101010);tests/kms_writeback.c +0
-4- -igt_remove_fb (display.drm_fd, &output_fb); - } igt_fixture() {cleanup_writeback (&display, output); --2.43.0
PATCH v6 8/8 tests/kms_writeback: Use helper to fetch default FB format
In reply to Sowmiya SReplace hardcoded RGB default selection with a
helper that chooses formats by requested BPC.
--- tests/kms_writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_writeback.c +1 -1
@@ -685,7 +685,7 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)igt_skip_on (data.dump_check || data.list_modes); fb_id =igt_create_fb (display.drm_fd, mode.hdisplay /2 , mode.vdisplay /2 , -DRM_FORMAT_XRGB8888 , +get_default_fb_format (&display,BPC_8 ),DRM_FORMAT_MOD_LINEAR , &invalid_output_fb);igt_require (fb_id >0 );
Signature · 1 line
2.43.0
RE: [PATCH i-g-t v6 8/8] tests/kms_writeback: Use helper to fetch default FB format
Quoted 5 lines
Subject: [PATCH i-g-t v6 8/8] tests/kms_writeback: Use helper to fetch default FB format
Replace hardcoded RGB default selection with a helper that chooses formats by requested BPC.
* "Replace remaining hardcoded formats ....."
With that fixed LGTM,
Quoted 22 lines
Signed-off-by Sowmiya S <[email protected]>--- tests/kms_writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/kms_writeback.c index renamed from tests/kms_writeback.c +0
-0
66da5603a..5d41a62d5100644tests/kms_writeback.c +1
-1@@ -685,7 +685,7 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)igt_skip_on (data.dump_check || data.list_modes); fb_id =igt_create_fb (display.drm_fd, mode.hdisplay /2 , mode.vdisplay /2 , -DRM_FORMAT_XRGB8888 , +get_default_fb_format (&display,BPC_8 ),DRM_FORMAT_MOD_LINEAR , &invalid_output_fb);
igt_require(fb_id > 0);
--
2.43.0
Patchwork
CI✓ Xe.CI.BAT: success for Add writeback changes for intel-supported formats (rev6)
In reply to Sowmiya S== Series Details ==
== Series Details ==
Series: Add writeback changes for intel-supported formats (rev6)
URL : https://patchwork.freedesktop.org/series/156913/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_8705_BAT -> XEIGTPW_14365_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (12 -> 12)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in XEIGTPW_14365_BAT that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@xe_waitfence@reltime:
- bat-dg2-oem2: [PASS][1] -> [FAIL][2] ([Intel XE#6520])
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8705/bat-dg2-oem2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14365/bat-dg2-oem2/igt@[email protected]
#### Possible fixes ####
* igt@xe_waitfence@engine:
- bat-dg2-oem2: [FAIL][3] ([Intel XE#6519]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8705/bat-dg2-oem2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14365/bat-dg2-oem2/igt@[email protected]
[Intel XE#6519]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6519
[Intel XE#6520]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6520
Build changes
-------------
* IGT: IGT_8705 -> IGTPW_14365
IGTPW_14365: 14365
IGT_8705: 8705
xe-4408-ce23d0a333e80437caeac552d098b1f241ff2926: ce23d0a333e80437caeac552d098b1f241ff2926
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_14365/index.html
Patchwork
CI✓ i915.CI.BAT: success for Add writeback changes for intel-supported formats (rev6)
In reply to Sowmiya S== Series Details ==
== Series Details ==
Series: Add writeback changes for intel-supported formats (rev6)
URL : https://patchwork.freedesktop.org/series/156913/
State : success
== Summary ==
CI Bug Log - changes from IGT_8705 -> IGTPW_14365
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/index.html
Participating hosts (42 -> 41)
------------------------------
Additional (1): bat-adls-6
Missing (2): bat-dg2-13 fi-snb-2520m
Known issues
------------
Here are the changes found in IGTPW_14365 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@dmabuf@all-tests@dma_fence_chain:
- bat-twl-2: NOTRUN -> [SKIP][1] ([i915#15249])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-twl-2/igt@dmabuf@all-tests@dma_fence_chain.html
* igt@gem_lmem_swapping@parallel-random-engines:
- bat-adls-6: NOTRUN -> [SKIP][2] ([i915#4613]) +3 other tests skip
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-adls-6/igt@[email protected]
* igt@gem_tiled_pread_basic:
- bat-adls-6: NOTRUN -> [SKIP][3] ([i915#3282])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-adls-6/igt@gem_tiled_pread_basic.html
* igt@i915_selftest@live@workarounds:
- bat-mtlp-9: [PASS][4] -> [DMESG-FAIL][5] ([i915#12061]) +1 other test dmesg-fail
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8705/bat-mtlp-9/igt@i915_selftest@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-mtlp-9/igt@i915_selftest@[email protected]
* igt@intel_hwmon@hwmon-read:
- bat-adls-6: NOTRUN -> [SKIP][6] ([i915#7707]) +1 other test skip
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-adls-6/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-adls-6: NOTRUN -> [SKIP][7] ([i915#4103]) +1 other test skip
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-adls-6/igt@[email protected]
* igt@kms_dsc@dsc-basic:
- bat-adls-6: NOTRUN -> [SKIP][8] ([i915#3555] / [i915#3840])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-adls-6/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- bat-adls-6: NOTRUN -> [SKIP][9]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-adls-6/igt@[email protected]
* igt@kms_pm_backlight@basic-brightness:
- bat-adls-6: NOTRUN -> [SKIP][10] ([i915#5354])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-adls-6/igt@[email protected]
* igt@kms_psr@psr-primary-mmap-gtt:
- bat-adls-6: NOTRUN -> [SKIP][11] ([i915#1072] / [i915#9732]) +3 other tests skip
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-adls-6/igt@[email protected]
* igt@kms_setmode@basic-clone-single-crtc:
- bat-adls-6: NOTRUN -> [SKIP][12] ([i915#3555])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-adls-6/igt@[email protected]
* igt@prime_vgem@basic-fence-read:
- bat-adls-6: NOTRUN -> [SKIP][13] ([i915#3291]) +2 other tests skip
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-adls-6/igt@[email protected]
#### Possible fixes ####
* igt@i915_selftest@live@guc:
- bat-twl-2: [ABORT][14] ([i915#14365]) -> [PASS][15] +1 other test pass
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8705/bat-twl-2/igt@i915_selftest@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-twl-2/igt@i915_selftest@[email protected]
* igt@i915_selftest@live@workarounds:
- bat-arlh-3: [DMESG-FAIL][16] ([i915#12061]) -> [PASS][17] +1 other test pass
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8705/bat-arlh-3/igt@i915_selftest@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-arlh-3/igt@i915_selftest@[email protected]
#### Warnings ####
* igt@i915_selftest@live:
- bat-atsm-1: [DMESG-FAIL][18] ([i915#12061] / [i915#14204]) -> [DMESG-FAIL][19] ([i915#12061] / [i915#13929])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8705/bat-atsm-1/igt@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-atsm-1/igt@[email protected]
* igt@i915_selftest@live@mman:
- bat-atsm-1: [DMESG-FAIL][20] ([i915#14204]) -> [DMESG-FAIL][21] ([i915#13929])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8705/bat-atsm-1/igt@i915_selftest@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/bat-atsm-1/igt@i915_selftest@[email protected]
[i915#1072]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1072
[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#13929]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13929
[i915#14204]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14204
[i915#14365]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14365
[i915#15249]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15249
[i915#3282]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555
[i915#3840]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3840
[i915#4103]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4103
[i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
[i915#5354]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5354
[i915#7707]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7707
[i915#9732]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9732
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_8705 -> IGTPW_14365
CI-20190529: 20190529
CI_DRM_17843: ce23d0a333e80437caeac552d098b1f241ff2926 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_14365: 14365
IGT_8705: 8705
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_14365/index.html