* [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback
@ 2026-10-25 18:24 atipre
2026-10-26 15:37 ` Kamil Konieczny
` (8 more replies)
0 siblings, 9 replies; 12+ messages in thread
From: atipre @ 2026-10-25 18:24 UTC (permalink / raw)
To: igt-dev; +Cc: dri-devel, louis.chauvet
The existing writeback tests validate captured framebuffer contents, but
do not keep pipe CRC capture active across writeback completion. This
misses the VKMS bug where writeback cleanup disables the composer while
CRC capture still needs it, leaving subsequent CRC reads waiting for
samples that never arrive.
Add writeback-preserves-crc. Complete the initial modeset before starting
capture and establish reference CRCs for separate red and blue input
framebuffers. Keep capture open across four alternating writebacks, wait
for each output fence, and compare three fresh CRC samples with the
corresponding reference after each writeback. Use atomic updates without
ALLOW_MODESET once capture starts, and release capture from the final
fixture so a failed subtest also closes it.
Check output fence status in the shared wait helper so a signalled error
fence cannot be treated as a successful writeback.
On ARM64 QEMU with one and two CPUs, the new subtest fails on unmodified
mainline and passes with the local VKMS composer-user lifetime
fix. Four existing applicable writeback subtests pass on both kernels;
the two XRGB2101010 subtests skip because the format probe rejects them.
Signed-off-by: atipre <tipreaditya@gmail.com>
---
tests/kms_writeback.c | 62 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
index 7c30e8e..71317cf 100644
--- a/tests/kms_writeback.c
+++ b/tests/kms_writeback.c
@@ -64,6 +64,10 @@
*
* SUBTEST: writeback-pixel-formats
* Description: Check the writeback format
+ *
+ * SUBTEST: writeback-preserves-crc
+ * Description: CRC capture remains active across completed writebacks
+ * Driver requirement: i915, xe, vkms
*/
IGT_TEST_DESCRIPTION(
@@ -317,6 +321,7 @@ static void get_and_wait_out_fence(igt_output_t *output)
ret = sync_fence_wait(output->writeback_out_fence_fd, 1000);
igt_assert_f(ret == 0, "sync_fence_wait failed: %s\n", strerror(-ret));
+ igt_assert_eq(sync_fence_status(output->writeback_out_fence_fd), 1);
close(output->writeback_out_fence_fd);
output->writeback_out_fence_fd = -1;
}
@@ -537,6 +542,7 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
igt_output_t *output;
igt_plane_t *plane;
igt_fb_t input_fb, input_fb_10bit;
+ static igt_pipe_crc_t *pipe_crc;
drmModeModeInfo mode;
unsigned int fb_id;
int ret;
@@ -709,7 +715,63 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
igt_remove_fb(display.drm_fd, &output_fb);
}
+ igt_describe("CRC capture remains active across completed writebacks");
+ igt_subtest("writeback-preserves-crc") {
+ igt_fb_t blue_fb, output_fb;
+ igt_fb_t *colors[] = { &input_fb, &blue_fb };
+ igt_crc_t reference[2], crc;
+ int i, j;
+
+ igt_skip_on(data.dump_check || data.list_modes);
+ igt_require(data.supported_colors & XRGB8888);
+ igt_require_pipe_crc(display.drm_fd);
+
+ igt_create_color_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
+ 0.0, 0.0, 1.0, &blue_fb);
+ igt_create_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
+ &output_fb);
+ fill_fb(&input_fb, 0x00ff0000);
+ igt_plane_set_fb(plane, &input_fb);
+ igt_output_set_writeback_fb(output, NULL);
+ igt_display_commit_atomic(&display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+
+ /* Finish the modeset before starting continuous CRC capture. */
+ pipe_crc = igt_pipe_crc_new(display.drm_fd, output->config.crtc_index,
+ IGT_PIPE_CRC_SOURCE_AUTO);
+ igt_pipe_crc_start(pipe_crc);
+
+ /* Establish both references before writeback can affect capture. */
+ for (i = 0; i < ARRAY_SIZE(colors); i++) {
+ igt_plane_set_fb(plane, colors[i]);
+ igt_display_commit_atomic(&display, 0, NULL);
+ igt_pipe_crc_get_current(display.drm_fd, pipe_crc, &reference[i]);
+ }
+
+ for (i = 0; i < 4; i++) {
+ int color = i % ARRAY_SIZE(colors);
+
+ igt_plane_set_fb(plane, colors[color]);
+ igt_output_set_writeback_fb(output, &output_fb);
+ igt_display_commit_atomic(&display, 0, NULL);
+ get_and_wait_out_fence(output);
+
+ /* Require fresh frames without stopping or restarting capture. */
+ for (j = 0; j < 3; j++) {
+ igt_pipe_crc_get_current(display.drm_fd, pipe_crc, &crc);
+ igt_assert_crc_equal(&reference[color], &crc);
+ }
+ }
+
+ igt_plane_set_fb(plane, &input_fb);
+ igt_display_commit_atomic(&display, 0, NULL);
+ igt_remove_fb(display.drm_fd, &blue_fb);
+ igt_remove_fb(display.drm_fd, &output_fb);
+ }
+
igt_fixture() {
+ igt_pipe_crc_free(pipe_crc);
cleanup_writeback(&display, output);
igt_remove_fb(display.drm_fd, &input_fb);
base-commit: bb76404eac7032ba85c53eac15b76e4fadaff0de
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback
2026-10-25 18:24 [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback atipre
@ 2026-10-26 15:37 ` Kamil Konieczny
2026-10-26 17:33 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
` (7 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Kamil Konieczny @ 2026-10-26 15:37 UTC (permalink / raw)
To: atipre; +Cc: igt-dev, dri-devel, louis.chauvet, Karthik B S, Swati Sharma
Hi atipre,
On 2026-10-25 at 14:24:20 -0400, atipre wrote:
> The existing writeback tests validate captured framebuffer contents, but
> do not keep pipe CRC capture active across writeback completion. This
> misses the VKMS bug where writeback cleanup disables the composer while
> CRC capture still needs it, leaving subsequent CRC reads waiting for
> samples that never arrive.
>
> Add writeback-preserves-crc. Complete the initial modeset before starting
> capture and establish reference CRCs for separate red and blue input
> framebuffers. Keep capture open across four alternating writebacks, wait
> for each output fence, and compare three fresh CRC samples with the
> corresponding reference after each writeback. Use atomic updates without
> ALLOW_MODESET once capture starts, and release capture from the final
> fixture so a failed subtest also closes it.
>
> Check output fence status in the shared wait helper so a signalled error
> fence cannot be treated as a successful writeback.
>
> On ARM64 QEMU with one and two CPUs, the new subtest fails on unmodified
> mainline and passes with the local VKMS composer-user lifetime
> fix. Four existing applicable writeback subtests pass on both kernels;
> the two XRGB2101010 subtests skip because the format probe rejects them.
>
> Signed-off-by: atipre <tipreaditya@gmail.com>
It would be preferable to have Full Name instead of nick,
should this be:
Signed-off-by: Tipre Aditya <tipreaditya@gmail.com>
?
If yes, add also same From: at beginnig or configure your git.
+cc Swati and Karthik
Cc: Karthik B S <karthik.b.s@intel.com>
Cc: Swati Sharma <swati2.sharma@intel.com>
Regards,
Kamil
> ---
> tests/kms_writeback.c | 62 +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 62 insertions(+)
>
> diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
> index 7c30e8e..71317cf 100644
> --- a/tests/kms_writeback.c
> +++ b/tests/kms_writeback.c
> @@ -64,6 +64,10 @@
> *
> * SUBTEST: writeback-pixel-formats
> * Description: Check the writeback format
> + *
> + * SUBTEST: writeback-preserves-crc
> + * Description: CRC capture remains active across completed writebacks
> + * Driver requirement: i915, xe, vkms
> */
>
> IGT_TEST_DESCRIPTION(
> @@ -317,6 +321,7 @@ static void get_and_wait_out_fence(igt_output_t *output)
>
> ret = sync_fence_wait(output->writeback_out_fence_fd, 1000);
> igt_assert_f(ret == 0, "sync_fence_wait failed: %s\n", strerror(-ret));
> + igt_assert_eq(sync_fence_status(output->writeback_out_fence_fd), 1);
> close(output->writeback_out_fence_fd);
> output->writeback_out_fence_fd = -1;
> }
> @@ -537,6 +542,7 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
> igt_output_t *output;
> igt_plane_t *plane;
> igt_fb_t input_fb, input_fb_10bit;
> + static igt_pipe_crc_t *pipe_crc;
> drmModeModeInfo mode;
> unsigned int fb_id;
> int ret;
> @@ -709,7 +715,63 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
> igt_remove_fb(display.drm_fd, &output_fb);
> }
>
> + igt_describe("CRC capture remains active across completed writebacks");
> + igt_subtest("writeback-preserves-crc") {
> + igt_fb_t blue_fb, output_fb;
> + igt_fb_t *colors[] = { &input_fb, &blue_fb };
> + igt_crc_t reference[2], crc;
> + int i, j;
> +
> + igt_skip_on(data.dump_check || data.list_modes);
> + igt_require(data.supported_colors & XRGB8888);
> + igt_require_pipe_crc(display.drm_fd);
> +
> + igt_create_color_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
> + DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
> + 0.0, 0.0, 1.0, &blue_fb);
> + igt_create_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
> + DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
> + &output_fb);
> + fill_fb(&input_fb, 0x00ff0000);
> + igt_plane_set_fb(plane, &input_fb);
> + igt_output_set_writeback_fb(output, NULL);
> + igt_display_commit_atomic(&display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> +
> + /* Finish the modeset before starting continuous CRC capture. */
> + pipe_crc = igt_pipe_crc_new(display.drm_fd, output->config.crtc_index,
> + IGT_PIPE_CRC_SOURCE_AUTO);
> + igt_pipe_crc_start(pipe_crc);
> +
> + /* Establish both references before writeback can affect capture. */
> + for (i = 0; i < ARRAY_SIZE(colors); i++) {
> + igt_plane_set_fb(plane, colors[i]);
> + igt_display_commit_atomic(&display, 0, NULL);
> + igt_pipe_crc_get_current(display.drm_fd, pipe_crc, &reference[i]);
> + }
> +
> + for (i = 0; i < 4; i++) {
> + int color = i % ARRAY_SIZE(colors);
> +
> + igt_plane_set_fb(plane, colors[color]);
> + igt_output_set_writeback_fb(output, &output_fb);
> + igt_display_commit_atomic(&display, 0, NULL);
> + get_and_wait_out_fence(output);
> +
> + /* Require fresh frames without stopping or restarting capture. */
> + for (j = 0; j < 3; j++) {
> + igt_pipe_crc_get_current(display.drm_fd, pipe_crc, &crc);
> + igt_assert_crc_equal(&reference[color], &crc);
> + }
> + }
> +
> + igt_plane_set_fb(plane, &input_fb);
> + igt_display_commit_atomic(&display, 0, NULL);
> + igt_remove_fb(display.drm_fd, &blue_fb);
> + igt_remove_fb(display.drm_fd, &output_fb);
> + }
> +
> igt_fixture() {
> + igt_pipe_crc_free(pipe_crc);
> cleanup_writeback(&display, output);
> igt_remove_fb(display.drm_fd, &input_fb);
>
>
> base-commit: bb76404eac7032ba85c53eac15b76e4fadaff0de
> --
> 2.50.1 (Apple Git-155)
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✗ LGCI.VerificationFailed: failure for tests/kms_writeback: Check CRC capture survives writeback
2026-10-25 18:24 [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback atipre
2026-10-26 15:37 ` Kamil Konieczny
@ 2026-10-26 17:33 ` Patchwork
2026-10-31 17:59 ` [PATCH i-g-t v2] " Aditya Tipre
` (6 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2026-10-26 17:33 UTC (permalink / raw)
To: atipre; +Cc: igt-dev
== Series Details ==
Series: tests/kms_writeback: Check CRC capture survives writeback
URL : https://patchwork.freedesktop.org/series/176841/
State : failure
== Summary ==
Series author address 'tipreaditya@gmail.com' is not on the allowlist, which prevents CI from being automatically triggered.
If you want CI to run for this series, ask Patchwork project owners to click 'retest' on the series in Patchwork.
Exception occurred during validation, bailing out!
Build URL: http://gfx-ci.igk.intel.com:8080/job/CI_IGTPW_check/243181/ (on cidrm1)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH i-g-t v2] tests/kms_writeback: Check CRC capture survives writeback
2026-10-25 18:24 [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback atipre
2026-10-26 15:37 ` Kamil Konieczny
2026-10-26 17:33 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
@ 2026-10-31 17:59 ` Aditya Tipre
2026-10-31 18:14 ` ✗ LGCI.VerificationFailed: failure for tests/kms_writeback: Check CRC capture survives writeback (rev2) Patchwork
` (5 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Aditya Tipre @ 2026-10-31 17:59 UTC (permalink / raw)
To: igt-dev
Cc: dri-devel, louis.chauvet, kamil.konieczny, karthik.b.s,
swati2.sharma, tipreaditya
The existing writeback tests validate captured framebuffer contents, but
do not keep pipe CRC capture active across writeback completion. This
misses the VKMS bug where writeback cleanup disables the composer while
CRC capture still needs it, leaving subsequent CRC reads waiting for
samples that never arrive.
Add writeback-preserves-crc. Complete the initial modeset before starting
capture and establish reference CRCs for separate red and blue input
framebuffers. Keep capture open across four alternating writebacks, wait
for each output fence, and compare three fresh CRC samples with the
corresponding reference after each writeback. Use atomic updates without
ALLOW_MODESET once capture starts, and release capture from the final
fixture so a failed subtest also closes it.
Check output fence status in the shared wait helper so a signalled error
fence cannot be treated as a successful writeback.
On ARM64 QEMU with one and two CPUs, the new subtest fails on unmodified
mainline and passes with the local VKMS composer-user lifetime
fix. Four existing applicable writeback subtests pass on both kernels;
the two XRGB2101010 subtests skip because the format probe rejects them.
Signed-off-by: Aditya Tipre <tipreaditya@gmail.com>
---
Changes in v2:
- Use my full name in the author and Signed-off-by fields.
- No code changes.
tests/kms_writeback.c | 62 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
index 7c30e8e..71317cf 100644
--- a/tests/kms_writeback.c
+++ b/tests/kms_writeback.c
@@ -64,6 +64,10 @@
*
* SUBTEST: writeback-pixel-formats
* Description: Check the writeback format
+ *
+ * SUBTEST: writeback-preserves-crc
+ * Description: CRC capture remains active across completed writebacks
+ * Driver requirement: i915, xe, vkms
*/
IGT_TEST_DESCRIPTION(
@@ -317,6 +321,7 @@ static void get_and_wait_out_fence(igt_output_t *output)
ret = sync_fence_wait(output->writeback_out_fence_fd, 1000);
igt_assert_f(ret == 0, "sync_fence_wait failed: %s\n", strerror(-ret));
+ igt_assert_eq(sync_fence_status(output->writeback_out_fence_fd), 1);
close(output->writeback_out_fence_fd);
output->writeback_out_fence_fd = -1;
}
@@ -537,6 +542,7 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
igt_output_t *output;
igt_plane_t *plane;
igt_fb_t input_fb, input_fb_10bit;
+ static igt_pipe_crc_t *pipe_crc;
drmModeModeInfo mode;
unsigned int fb_id;
int ret;
@@ -709,7 +715,63 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
igt_remove_fb(display.drm_fd, &output_fb);
}
+ igt_describe("CRC capture remains active across completed writebacks");
+ igt_subtest("writeback-preserves-crc") {
+ igt_fb_t blue_fb, output_fb;
+ igt_fb_t *colors[] = { &input_fb, &blue_fb };
+ igt_crc_t reference[2], crc;
+ int i, j;
+
+ igt_skip_on(data.dump_check || data.list_modes);
+ igt_require(data.supported_colors & XRGB8888);
+ igt_require_pipe_crc(display.drm_fd);
+
+ igt_create_color_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
+ 0.0, 0.0, 1.0, &blue_fb);
+ igt_create_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
+ &output_fb);
+ fill_fb(&input_fb, 0x00ff0000);
+ igt_plane_set_fb(plane, &input_fb);
+ igt_output_set_writeback_fb(output, NULL);
+ igt_display_commit_atomic(&display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+
+ /* Finish the modeset before starting continuous CRC capture. */
+ pipe_crc = igt_pipe_crc_new(display.drm_fd, output->config.crtc_index,
+ IGT_PIPE_CRC_SOURCE_AUTO);
+ igt_pipe_crc_start(pipe_crc);
+
+ /* Establish both references before writeback can affect capture. */
+ for (i = 0; i < ARRAY_SIZE(colors); i++) {
+ igt_plane_set_fb(plane, colors[i]);
+ igt_display_commit_atomic(&display, 0, NULL);
+ igt_pipe_crc_get_current(display.drm_fd, pipe_crc, &reference[i]);
+ }
+
+ for (i = 0; i < 4; i++) {
+ int color = i % ARRAY_SIZE(colors);
+
+ igt_plane_set_fb(plane, colors[color]);
+ igt_output_set_writeback_fb(output, &output_fb);
+ igt_display_commit_atomic(&display, 0, NULL);
+ get_and_wait_out_fence(output);
+
+ /* Require fresh frames without stopping or restarting capture. */
+ for (j = 0; j < 3; j++) {
+ igt_pipe_crc_get_current(display.drm_fd, pipe_crc, &crc);
+ igt_assert_crc_equal(&reference[color], &crc);
+ }
+ }
+
+ igt_plane_set_fb(plane, &input_fb);
+ igt_display_commit_atomic(&display, 0, NULL);
+ igt_remove_fb(display.drm_fd, &blue_fb);
+ igt_remove_fb(display.drm_fd, &output_fb);
+ }
+
igt_fixture() {
+ igt_pipe_crc_free(pipe_crc);
cleanup_writeback(&display, output);
igt_remove_fb(display.drm_fd, &input_fb);
base-commit: bb76404eac7032ba85c53eac15b76e4fadaff0de
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 12+ messages in thread
* ✗ LGCI.VerificationFailed: failure for tests/kms_writeback: Check CRC capture survives writeback (rev2)
2026-10-25 18:24 [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback atipre
` (2 preceding siblings ...)
2026-10-31 17:59 ` [PATCH i-g-t v2] " Aditya Tipre
@ 2026-10-31 18:14 ` Patchwork
2026-11-02 19:19 ` ✓ Xe.CI.BAT: success for tests/kms_writeback: Check CRC capture survives writeback (rev3) Patchwork
` (4 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2026-10-31 18:14 UTC (permalink / raw)
To: Aditya Tipre; +Cc: igt-dev
== Series Details ==
Series: tests/kms_writeback: Check CRC capture survives writeback (rev2)
URL : https://patchwork.freedesktop.org/series/176841/
State : failure
== Summary ==
Series author address 'tipreaditya@gmail.com' is not on the allowlist, which prevents CI from being automatically triggered.
If you want CI to run for this series, ask Patchwork project owners to click 'retest' on the series in Patchwork.
Exception occurred during validation, bailing out!
Build URL: http://gfx-ci.igk.intel.com:8080/job/CI_IGTPW_check/243327/ (on cidrm1)
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✓ Xe.CI.BAT: success for tests/kms_writeback: Check CRC capture survives writeback (rev3)
2026-10-25 18:24 [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback atipre
` (3 preceding siblings ...)
2026-10-31 18:14 ` ✗ LGCI.VerificationFailed: failure for tests/kms_writeback: Check CRC capture survives writeback (rev2) Patchwork
@ 2026-11-02 19:19 ` Patchwork
2026-11-02 19:24 ` ✓ i915.CI.BAT: " Patchwork
` (3 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2026-11-02 19:19 UTC (permalink / raw)
To: Aditya Tipre; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 794 bytes --]
== Series Details ==
Series: tests/kms_writeback: Check CRC capture survives writeback (rev3)
URL : https://patchwork.freedesktop.org/series/176841/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_9175_BAT -> XEIGTPW_16083_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (15 -> 15)
------------------------------
No changes in participating hosts
Changes
-------
No changes found
Build changes
-------------
* IGT: IGT_9175 -> IGTPW_16083
IGTPW_16083: 16083
IGT_9175: 9175
xe-6046-79cefeb775e63da397152ab01c2f1d4fa1b9b46d: 79cefeb775e63da397152ab01c2f1d4fa1b9b46d
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_16083/index.html
[-- Attachment #2: Type: text/html, Size: 1339 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✓ i915.CI.BAT: success for tests/kms_writeback: Check CRC capture survives writeback (rev3)
2026-10-25 18:24 [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback atipre
` (4 preceding siblings ...)
2026-11-02 19:19 ` ✓ Xe.CI.BAT: success for tests/kms_writeback: Check CRC capture survives writeback (rev3) Patchwork
@ 2026-11-02 19:24 ` Patchwork
2026-11-02 19:49 ` ✓ Xe.CI.FULL: " Patchwork
` (2 subsequent siblings)
8 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2026-11-02 19:24 UTC (permalink / raw)
To: Aditya Tipre; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 1623 bytes --]
== Series Details ==
Series: tests/kms_writeback: Check CRC capture survives writeback (rev3)
URL : https://patchwork.freedesktop.org/series/176841/
State : success
== Summary ==
CI Bug Log - changes from IGT_9175 -> IGTPW_16083
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/index.html
Participating hosts (38 -> 39)
------------------------------
Additional (2): bat-arls-5 bat-adls-6
Missing (1): bat-dg2-13
Known issues
------------
Here are the changes found in IGTPW_16083 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@runner@aborted:
- bat-adls-6: NOTRUN -> [FAIL][1] ([i915#17747])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/bat-adls-6/igt@runner@aborted.html
- bat-arls-5: NOTRUN -> [FAIL][2] ([i915#17747])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/bat-arls-5/igt@runner@aborted.html
[i915#17747]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17747
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_9175 -> IGTPW_16083
* Linux: CI_DRM_19430 -> CI_DRM_19431
CI-20190529: 20190529
CI_DRM_19430: 79cefeb775e63da397152ab01c2f1d4fa1b9b46d @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_19431: 2cd78713d917a02987f21b437561a5e1e13ddda2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_16083: 16083
IGT_9175: 9175
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/index.html
[-- Attachment #2: Type: text/html, Size: 2309 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✓ Xe.CI.FULL: success for tests/kms_writeback: Check CRC capture survives writeback (rev3)
2026-10-25 18:24 [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback atipre
` (5 preceding siblings ...)
2026-11-02 19:24 ` ✓ i915.CI.BAT: " Patchwork
@ 2026-11-02 19:49 ` Patchwork
2026-11-02 21:06 ` ✓ i915.CI.Full: " Patchwork
2026-11-04 13:37 ` [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback S, Sowmiya
8 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2026-11-02 19:49 UTC (permalink / raw)
To: Aditya Tipre; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 794 bytes --]
== Series Details ==
Series: tests/kms_writeback: Check CRC capture survives writeback (rev3)
URL : https://patchwork.freedesktop.org/series/176841/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_9175_FULL -> XEIGTPW_16083_FULL
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (3 -> 3)
------------------------------
No changes in participating hosts
Changes
-------
No changes found
Build changes
-------------
* IGT: IGT_9175 -> IGTPW_16083
IGTPW_16083: 16083
IGT_9175: 9175
xe-6046-79cefeb775e63da397152ab01c2f1d4fa1b9b46d: 79cefeb775e63da397152ab01c2f1d4fa1b9b46d
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_16083/index.html
[-- Attachment #2: Type: text/html, Size: 1339 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* ✓ i915.CI.Full: success for tests/kms_writeback: Check CRC capture survives writeback (rev3)
2026-10-25 18:24 [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback atipre
` (6 preceding siblings ...)
2026-11-02 19:49 ` ✓ Xe.CI.FULL: " Patchwork
@ 2026-11-02 21:06 ` Patchwork
2026-11-04 13:37 ` [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback S, Sowmiya
8 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2026-11-02 21:06 UTC (permalink / raw)
To: Aditya Tipre; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 6057 bytes --]
== Series Details ==
Series: tests/kms_writeback: Check CRC capture survives writeback (rev3)
URL : https://patchwork.freedesktop.org/series/176841/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_19431_full -> IGTPW_16083_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/index.html
Participating hosts (11 -> 10)
------------------------------
Missing (1): pig-kbl-iris
Known issues
------------
Here are the changes found in IGTPW_16083_full that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@i915_module_load@load:
- shard-tglu: ([PASS][1], [PASS][2], [PASS][3], [PASS][4], [PASS][5], [PASS][6], [PASS][7], [PASS][8], [PASS][9], [PASS][10], [PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [PASS][17], [PASS][18], [SKIP][19], [PASS][20]) ([i915#17257]) -> ([PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25], [PASS][26], [PASS][27], [PASS][28], [PASS][29], [PASS][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35], [PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-5/igt@i915_module_load@load.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-4/igt@i915_module_load@load.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-7/igt@i915_module_load@load.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-10/igt@i915_module_load@load.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-5/igt@i915_module_load@load.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-4/igt@i915_module_load@load.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-9/igt@i915_module_load@load.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-2/igt@i915_module_load@load.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-2/igt@i915_module_load@load.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-4/igt@i915_module_load@load.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-9/igt@i915_module_load@load.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-10/igt@i915_module_load@load.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-8/igt@i915_module_load@load.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-3/igt@i915_module_load@load.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-2/igt@i915_module_load@load.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-9/igt@i915_module_load@load.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-8/igt@i915_module_load@load.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-5/igt@i915_module_load@load.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-7/igt@i915_module_load@load.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19431/shard-tglu-3/igt@i915_module_load@load.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-4/igt@i915_module_load@load.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-8/igt@i915_module_load@load.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-9/igt@i915_module_load@load.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-2/igt@i915_module_load@load.html
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-8/igt@i915_module_load@load.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-10/igt@i915_module_load@load.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-10/igt@i915_module_load@load.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-5/igt@i915_module_load@load.html
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-4/igt@i915_module_load@load.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-3/igt@i915_module_load@load.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-4/igt@i915_module_load@load.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-5/igt@i915_module_load@load.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-3/igt@i915_module_load@load.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-7/igt@i915_module_load@load.html
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-2/igt@i915_module_load@load.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-7/igt@i915_module_load@load.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-9/igt@i915_module_load@load.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-3/igt@i915_module_load@load.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-8/igt@i915_module_load@load.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/shard-tglu-7/igt@i915_module_load@load.html
[i915#17257]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/17257
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_9175 -> IGTPW_16083
* Piglit: piglit_4509 -> None
CI-20190529: 20190529
CI_DRM_19431: 2cd78713d917a02987f21b437561a5e1e13ddda2 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_16083: 16083
IGT_9175: 9175
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_16083/index.html
[-- Attachment #2: Type: text/html, Size: 6688 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback
2026-10-25 18:24 [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback atipre
` (7 preceding siblings ...)
2026-11-02 21:06 ` ✓ i915.CI.Full: " Patchwork
@ 2026-11-04 13:37 ` S, Sowmiya
2026-11-05 22:56 ` [PATCH i-g-t v3 1/2] tests/kms_writeback: Wait for the valid FB ID writeback Aditya Tipre
8 siblings, 1 reply; 12+ messages in thread
From: S, Sowmiya @ 2026-11-04 13:37 UTC (permalink / raw)
To: atipre, igt-dev@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, louis.chauvet@bootlin.com
Hi @atipre,
> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of atipre
> Sent: 25 October 2026 23:54
> To: igt-dev@lists.freedesktop.org
> Cc: dri-devel@lists.freedesktop.org; louis.chauvet@bootlin.com
> Subject: [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives
> writeback
>
> The existing writeback tests validate captured framebuffer contents, but do not
> keep pipe CRC capture active across writeback completion. This misses the
> VKMS bug where writeback cleanup disables the composer while CRC capture
> still needs it, leaving subsequent CRC reads waiting for samples that never
> arrive.
>
> Add writeback-preserves-crc. Complete the initial modeset before starting
> capture and establish reference CRCs for separate red and blue input
> framebuffers. Keep capture open across four alternating writebacks, wait for
> each output fence, and compare three fresh CRC samples with the
> corresponding reference after each writeback. Use atomic updates without
> ALLOW_MODESET once capture starts, and release capture from the final
> fixture so a failed subtest also closes it.
>
> Check output fence status in the shared wait helper so a signalled error fence
> cannot be treated as a successful writeback.
>
> On ARM64 QEMU with one and two CPUs, the new subtest fails on unmodified
> mainline and passes with the local VKMS composer-user lifetime fix. Four
> existing applicable writeback subtests pass on both kernels; the two
> XRGB2101010 subtests skip because the format probe rejects them.
>
> Signed-off-by: atipre <tipreaditya@gmail.com>
> ---
> tests/kms_writeback.c | 62
> +++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 62 insertions(+)
>
> diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c index
> 7c30e8e..71317cf 100644
> --- a/tests/kms_writeback.c
> +++ b/tests/kms_writeback.c
> @@ -64,6 +64,10 @@
> *
> * SUBTEST: writeback-pixel-formats
> * Description: Check the writeback format
> + *
> + * SUBTEST: writeback-preserves-crc
> + * Description: CRC capture remains active across completed writebacks
> + * Driver requirement: i915, xe, vkms
Xe doesn't support writeback. We can't test it now. In future, we can. I hope you didn't tested it on xe.
> */
>
> IGT_TEST_DESCRIPTION(
> @@ -317,6 +321,7 @@ static void get_and_wait_out_fence(igt_output_t
> *output)
>
> ret = sync_fence_wait(output->writeback_out_fence_fd, 1000);
> igt_assert_f(ret == 0, "sync_fence_wait failed: %s\n", strerror(-ret));
> + igt_assert_eq(sync_fence_status(output->writeback_out_fence_fd), 1);
> close(output->writeback_out_fence_fd);
> output->writeback_out_fence_fd = -1;
> }
> @@ -537,6 +542,7 @@ int igt_main_args("b:c:f:dl", long_options, help_str,
> opt_handler, NULL)
> igt_output_t *output;
> igt_plane_t *plane;
> igt_fb_t input_fb, input_fb_10bit;
> + static igt_pipe_crc_t *pipe_crc;
> drmModeModeInfo mode;
> unsigned int fb_id;
> int ret;
> @@ -709,7 +715,63 @@ int igt_main_args("b:c:f:dl", long_options, help_str,
> opt_handler, NULL)
> igt_remove_fb(display.drm_fd, &output_fb);
> }
>
> + igt_describe("CRC capture remains active across completed
> writebacks");
> + igt_subtest("writeback-preserves-crc") {
> + igt_fb_t blue_fb, output_fb;
> + igt_fb_t *colors[] = { &input_fb, &blue_fb };
> + igt_crc_t reference[2], crc;
> + int i, j;
> +
> + igt_skip_on(data.dump_check || data.list_modes);
> + igt_require(data.supported_colors & XRGB8888);
> + igt_require_pipe_crc(display.drm_fd);
> +
> + igt_create_color_fb(display.drm_fd, mode.hdisplay,
> mode.vdisplay,
> + DRM_FORMAT_XRGB8888,
> DRM_FORMAT_MOD_LINEAR,
> + 0.0, 0.0, 1.0, &blue_fb);
> + igt_create_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
> + DRM_FORMAT_XRGB8888,
> DRM_FORMAT_MOD_LINEAR,
> + &output_fb);
> + fill_fb(&input_fb, 0x00ff0000);
> + igt_plane_set_fb(plane, &input_fb);
> + igt_output_set_writeback_fb(output, NULL);
> + igt_display_commit_atomic(&display,
> DRM_MODE_ATOMIC_ALLOW_MODESET,
> +NULL);
> +
> + /* Finish the modeset before starting continuous CRC capture.
> */
> + pipe_crc = igt_pipe_crc_new(display.drm_fd, output-
> >config.crtc_index,
> + IGT_PIPE_CRC_SOURCE_AUTO);
> + igt_pipe_crc_start(pipe_crc);
> +
> + /* Establish both references before writeback can affect
> capture. */
> + for (i = 0; i < ARRAY_SIZE(colors); i++) {
> + igt_plane_set_fb(plane, colors[i]);
> + igt_display_commit_atomic(&display, 0, NULL);
> + igt_pipe_crc_get_current(display.drm_fd, pipe_crc,
> &reference[i]);
> + }
> +
> + for (i = 0; i < 4; i++) {
> + int color = i % ARRAY_SIZE(colors);
> +
> + igt_plane_set_fb(plane, colors[color]);
> + igt_output_set_writeback_fb(output, &output_fb);
> + igt_display_commit_atomic(&display, 0, NULL);
> + get_and_wait_out_fence(output);
> +
This drops DRM_MODE_ATOMIC_ALLOW_MODESET for a WRITEBACK_FB_ID commit.
Every other call site of igt_output_set_writeback_fb() in this file
(do_writeback_test(), writeback_sequence()) and in kms_colorop.c pairs
it with ALLOW_MODESET, with no exceptions. igt_display_commit_atomic()
asserts on a non-zero return, so if the kernel still requires
ALLOW_MODESET here on i915/xe, this subtest will hard-fail there for
reasons unrelated to the composer bug being tested.
Did you confirm this commit actually succeeds without ALLOW_MODESET,
or did it only need to work on the vkms config you tested against? If
it's vkms-specific behavior, worth a comment explaining why it's safe
to drop here when nothing else in the file does.
> + /* Require fresh frames without stopping or restarting
> capture. */
> + for (j = 0; j < 3; j++) {
> + igt_pipe_crc_get_current(display.drm_fd,
> pipe_crc, &crc);
> + igt_assert_crc_equal(&reference[color], &crc);
> + }
> + }
> +
> + igt_plane_set_fb(plane, &input_fb);
> + igt_display_commit_atomic(&display, 0, NULL);
> + igt_remove_fb(display.drm_fd, &blue_fb);
> + igt_remove_fb(display.drm_fd, &output_fb);
> + }
Minor: blue_fb/output_fb are only released at the end of the subtest
body, so an igt_assert_crc_equal() failure inside the loop above (the
actual failure mode this test is meant to catch) will leak both FBs
for the rest of the binary's run. You already handled this correctly
for pipe_crc (static + unconditional free in the trailing fixture);
might be worth the same treatment here, though it's low severity.
> +
> igt_fixture() {
> + igt_pipe_crc_free(pipe_crc);
> cleanup_writeback(&display, output);
> igt_remove_fb(display.drm_fd, &input_fb);
>
>
> base-commit: bb76404eac7032ba85c53eac15b76e4fadaff0de
> --
> 2.50.1 (Apple Git-155)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH i-g-t v3 1/2] tests/kms_writeback: Wait for the valid FB ID writeback
2026-11-04 13:37 ` [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback S, Sowmiya
@ 2026-11-05 22:56 ` Aditya Tipre
2026-11-05 22:56 ` [PATCH i-g-t v3 2/2] tests/kms_writeback: Check CRC capture survives writeback Aditya Tipre
0 siblings, 1 reply; 12+ messages in thread
From: Aditya Tipre @ 2026-11-05 22:56 UTC (permalink / raw)
To: igt-dev
Cc: dri-devel, louis.chauvet, sowmiya.s, kamil.konieczny, karthik.b.s,
swati2.sharma, tipreaditya
The positive WRITEBACK_FB_ID test submits a writeback to the common input
framebuffer without requesting or waiting for its completion fence. A
blocking atomic commit does not imply that writeback has finished.
The following pixel-output test fills the same buffer with its reference
color. The earlier writeback can still be modifying it, leaving a mixture
of the old and new contents and causing intermittent checksum failures.
On ARM64 VKMS, a diagnostic run observed the prior fence still unsignalled
and a black row in both the input and the captured output after the input
had been filled red.
Request a fence for the successful FB ID writeback and wait for it before
returning. Only require the returned fence descriptor to be -1 when the
commit fails, so the shared commit helper also accepts this successful
fenced operation. Keep all invalid-parameter checks intact.
Signed-off-by: Aditya Tipre <tipreaditya@gmail.com>
---
New prerequisite in v3:
- Wait for the existing valid FB ID writeback before its target buffer is
reused as input by the next subtest.
A diagnostic run observed the prior fence still unsignalled and a row of
old black pixels replacing red input pixels. Waiting for the fence removes
this race. The standalone fix passes the four applicable existing subtests
on unfixed and fixed VKMS kernels with one and two CPUs; both XRGB2101010
cases skip.
tests/kms_writeback.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
index 7c30e8e..550d603 100644
--- a/tests/kms_writeback.c
+++ b/tests/kms_writeback.c
@@ -228,7 +228,7 @@ static int do_writeback_test(igt_output_t *output, uint32_t fb_id,
ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
- if (ptr_valid)
+ if (ptr_valid && ret)
igt_assert(*out_fence_ptr == -1);
/* WRITEBACK_FB_ID must always read as zero */
@@ -288,8 +288,12 @@ static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb, igt_fb_t *
igt_assert_eq(ret, 0);
/* Valid output buffer */
- ret = do_writeback_test(output, valid_fb->fb_id, NULL, false);
+ ret = do_writeback_test(output, valid_fb->fb_id,
+ &output->writeback_out_fence_fd, true);
igt_assert_eq(ret, 0);
+
+ /* The next subtest may reuse this buffer as input. */
+ igt_get_and_wait_out_fence(output);
}
static void fill_fb(igt_fb_t *fb, uint32_t pixel)
base-commit: 454657e58fbcfd6fa8a9db0830aa1652fe6364c2
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH i-g-t v3 2/2] tests/kms_writeback: Check CRC capture survives writeback
2026-11-05 22:56 ` [PATCH i-g-t v3 1/2] tests/kms_writeback: Wait for the valid FB ID writeback Aditya Tipre
@ 2026-11-05 22:56 ` Aditya Tipre
0 siblings, 0 replies; 12+ messages in thread
From: Aditya Tipre @ 2026-11-05 22:56 UTC (permalink / raw)
To: igt-dev
Cc: dri-devel, louis.chauvet, sowmiya.s, kamil.konieczny, karthik.b.s,
swati2.sharma, tipreaditya
The existing writeback tests validate captured framebuffer contents, but
do not keep pipe CRC capture active across writeback completion. This
misses the VKMS bug where writeback cleanup disables the composer while
CRC capture still needs it, leaving subsequent CRC reads waiting for
samples that never arrive.
Add a VKMS-only writeback-preserves-crc subtest. Complete the initial
modeset before starting capture and establish reference CRCs for separate
red and blue input framebuffers. Keep capture open across four alternating
writebacks, wait for each output fence, and compare three fresh CRC samples
with the corresponding reference after each writeback. Do not allow
modesets once capture starts, since they may disrupt CRC generation.
Clear the pending out-fence request left by the configuration probe before
the initial modeset so the subtest also works when run independently.
Use the final fixture to close capture, disable the output, and remove the
two new framebuffers so subtest failure or skip also cleans them up.
Check output fence status in the shared wait helper so a signalled error
fence cannot be treated as a successful writeback.
On ARM64 QEMU with one and two CPUs, the new subtest fails with a CRC read
timeout on the unmodified kernel and passes with the VKMS composer-user
lifetime fix, both independently and in the full writeback suite.
Signed-off-by: Aditya Tipre <tipreaditya@gmail.com>
---
Changes in v3:
- Add the preceding writeback-fb-id completion fix so earlier subtests do
not race while reusing the shared input framebuffer.
- Restrict the new subtest to VKMS in metadata and at runtime.
- Explain why commits after starting CRC capture do not allow modesets.
- Release the new framebuffers in the final fixture after disabling output.
- Clear the configuration probe's pending writeback out-fence request so
the subtest works independently of earlier writeback subtests.
Changes in v2:
- Use my full name in the author and Signed-off-by fields.
- No code changes.
Validation on ARM64 QEMU/HVF with one and two CPUs:
- With both patches applied, all four existing applicable subtests pass on
the unfixed and fixed kernels; both XRGB2101010 cases skip.
- The new regression, independently and in the full suite, times out at
the post-writeback CRC read on the unfixed kernel and passes with the
VKMS composer lifetime fix.
- Disposable probes verify FB and buffer-handle cleanup before DRM FD close
after partial setup, CRC comparison failure while blue is scanned out,
the natural baseline timeout, success, and skip.
tests/kms_writeback.c | 67 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
index 550d603..e277752 100644
--- a/tests/kms_writeback.c
+++ b/tests/kms_writeback.c
@@ -64,6 +64,10 @@
*
* SUBTEST: writeback-pixel-formats
* Description: Check the writeback format
+ *
+ * SUBTEST: writeback-preserves-crc
+ * Description: CRC capture remains active across completed writebacks
+ * Driver requirement: vkms
*/
IGT_TEST_DESCRIPTION(
@@ -321,6 +325,7 @@ static void get_and_wait_out_fence(igt_output_t *output)
ret = sync_fence_wait(output->writeback_out_fence_fd, 1000);
igt_assert_f(ret == 0, "sync_fence_wait failed: %s\n", strerror(-ret));
+ igt_assert_eq(sync_fence_status(output->writeback_out_fence_fd), 1);
close(output->writeback_out_fence_fd);
output->writeback_out_fence_fd = -1;
}
@@ -541,6 +546,8 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
igt_output_t *output;
igt_plane_t *plane;
igt_fb_t input_fb, input_fb_10bit;
+ static igt_pipe_crc_t *pipe_crc;
+ static igt_fb_t crc_blue_fb, crc_output_fb;
drmModeModeInfo mode;
unsigned int fb_id;
int ret;
@@ -713,8 +720,68 @@ int igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
igt_remove_fb(display.drm_fd, &output_fb);
}
+ igt_describe("CRC capture remains active across completed writebacks");
+ igt_subtest("writeback-preserves-crc") {
+ igt_fb_t *colors[] = { &input_fb, &crc_blue_fb };
+ igt_crc_t reference[2], crc;
+ int i, j;
+
+ igt_skip_on(data.dump_check || data.list_modes);
+ igt_require(is_vkms_device(display.drm_fd));
+ igt_require(data.supported_colors & XRGB8888);
+ igt_require_pipe_crc(display.drm_fd);
+
+ igt_create_color_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
+ 0.0, 0.0, 1.0, &crc_blue_fb);
+ igt_create_fb(display.drm_fd, mode.hdisplay, mode.vdisplay,
+ DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR,
+ &crc_output_fb);
+ fill_fb(&input_fb, 0x00ff0000);
+ igt_plane_set_fb(plane, &input_fb);
+ igt_output_set_writeback_fb(output, NULL);
+ /* Discard the out-fence request left by the configuration probe. */
+ igt_output_set_prop_value(output, IGT_CONNECTOR_WRITEBACK_OUT_FENCE_PTR,
+ to_user_pointer(NULL));
+ igt_display_commit_atomic(&display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+
+ /* Finish the modeset before starting continuous CRC capture. */
+ pipe_crc = igt_pipe_crc_new(display.drm_fd, output->config.crtc_index,
+ IGT_PIPE_CRC_SOURCE_AUTO);
+ igt_pipe_crc_start(pipe_crc);
+
+ /*
+ * Establish both references before writeback can affect capture.
+ * Do not allow modesets below: they may disrupt continuous CRC
+ * generation.
+ */
+ for (i = 0; i < ARRAY_SIZE(colors); i++) {
+ igt_plane_set_fb(plane, colors[i]);
+ igt_display_commit_atomic(&display, 0, NULL);
+ igt_pipe_crc_get_current(display.drm_fd, pipe_crc, &reference[i]);
+ }
+
+ for (i = 0; i < 4; i++) {
+ int color = i % ARRAY_SIZE(colors);
+
+ igt_plane_set_fb(plane, colors[color]);
+ igt_output_set_writeback_fb(output, &crc_output_fb);
+ igt_display_commit_atomic(&display, 0, NULL);
+ get_and_wait_out_fence(output);
+
+ /* Require fresh frames without stopping or restarting capture. */
+ for (j = 0; j < 3; j++) {
+ igt_pipe_crc_get_current(display.drm_fd, pipe_crc, &crc);
+ igt_assert_crc_equal(&reference[color], &crc);
+ }
+ }
+ }
+
igt_fixture() {
+ igt_pipe_crc_free(pipe_crc);
cleanup_writeback(&display, output);
+ igt_remove_fb(display.drm_fd, &crc_blue_fb);
+ igt_remove_fb(display.drm_fd, &crc_output_fb);
igt_remove_fb(display.drm_fd, &input_fb);
if (data.supported_colors & XRGB2101010)
--
2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-11-05 22:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-25 18:24 [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback atipre
2026-10-26 15:37 ` Kamil Konieczny
2026-10-26 17:33 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
2026-10-31 17:59 ` [PATCH i-g-t v2] " Aditya Tipre
2026-10-31 18:14 ` ✗ LGCI.VerificationFailed: failure for tests/kms_writeback: Check CRC capture survives writeback (rev2) Patchwork
2026-11-02 19:19 ` ✓ Xe.CI.BAT: success for tests/kms_writeback: Check CRC capture survives writeback (rev3) Patchwork
2026-11-02 19:24 ` ✓ i915.CI.BAT: " Patchwork
2026-11-02 19:49 ` ✓ Xe.CI.FULL: " Patchwork
2026-11-02 21:06 ` ✓ i915.CI.Full: " Patchwork
2026-11-04 13:37 ` [PATCH i-g-t] tests/kms_writeback: Check CRC capture survives writeback S, Sowmiya
2026-11-05 22:56 ` [PATCH i-g-t v3 1/2] tests/kms_writeback: Wait for the valid FB ID writeback Aditya Tipre
2026-11-05 22:56 ` [PATCH i-g-t v3 2/2] tests/kms_writeback: Check CRC capture survives writeback Aditya Tipre
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.