<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hi Alex,</p>
    <div class="moz-cite-prefix">On 6/23/2025 3:25 PM, Kamil Konieczny
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:20250623095502.5jeyyxkpfczucd2n@kamilkon-DESK.igk.intel.com">
      <pre wrap="" class="moz-quote-pre">Hi Alex,
On 2025-06-18 at 17:01:05 -0600, Alex Hung wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">From: Harry Wentland <a class="moz-txt-link-rfc2396E" href="mailto:harry.wentland@amd.com"><harry.wentland@amd.com></a>

VKMS doesn't like us to add buffers with unknown fourcc
type. Other drivers might behave similarly. Make sure
we avoid creating 10bpc buffers if they are not supported.

Signed-off-by: Alex Hung <a class="moz-txt-link-rfc2396E" href="mailto:alex.hung@amd.com"><alex.hung@amd.com></a>
Signed-off-by: Harry Wentland <a class="moz-txt-link-rfc2396E" href="mailto:harry.wentland@amd.com"><harry.wentland@amd.com></a>
---
 tests/kms_writeback.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c
index d075cc5b6..20c3a32c2 100644
--- a/tests/kms_writeback.c
+++ b/tests/kms_writeback.c
@@ -112,6 +112,10 @@ static bool check_writeback_config(igt_display_t *display, igt_output_t *output,
        height = override_mode.vdisplay;
 
        for (i = 0; i < sizeof(fourcc) / sizeof(uint32_t); i++) {
+               plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
+
+               if (!igt_plane_has_format_mod(plane, fourcc[i], DRM_FORMAT_MOD_LINEAR))
+                       continue;
 
                ret = igt_create_fb(display->drm_fd, width, height,
                                    fourcc[i], modifier, &input_fb);
@@ -121,7 +125,6 @@ static bool check_writeback_config(igt_display_t *display, igt_output_t *output,
                                    fourcc[i], modifier, &output_fb);
                igt_assert_lte(0, ret);
 
-               plane = igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY);
                igt_plane_set_fb(plane, &input_fb);
                igt_output_set_writeback_fb(output, &output_fb);
 
@@ -571,12 +574,14 @@ igt_main_args("b:c:f:dl", long_options, help_str, opt_handler, NULL)
                                      &input_fb);
                igt_assert(fb_id >= 0);
 
-               fb_id = igt_create_fb(display.drm_fd, mode.hdisplay,
-                                     mode.vdisplay,
-                                     DRM_FORMAT_XRGB2101010,
-                                     DRM_FORMAT_MOD_LINEAR,
-                                     &input_fb_10bit);
-               igt_assert(fb_id >= 0);
+               if (igt_plane_has_format_mod(plane, DRM_FORMAT_XRGB2101010, DRM_FORMAT_MOD_LINEAR)) {
</pre>
      </blockquote>
      <pre wrap="" class="moz-quote-pre">
First change looks good but I am not sure about this one,
Karthik or Swati could you help here?</pre>
    </blockquote>
    <p>The change itself looks good as standalone update, but one
      thought I've is if we could check using the 'supported_colors'
      variable here, similar to how it's used in the <span style="white-space: pre-wrap">XRGB2101010 subtests?</span></p>
    <span style="white-space: pre-wrap">Regards,</span><br>
    <span style="white-space: pre-wrap">Karthik.B.S</span>
    <blockquote type="cite" cite="mid:20250623095502.5jeyyxkpfczucd2n@kamilkon-DESK.igk.intel.com">
      <pre wrap="" class="moz-quote-pre">

Adding to cc:
Cc: Karthik B S <a class="moz-txt-link-rfc2396E" href="mailto:karthik.b.s@intel.com"><karthik.b.s@intel.com></a>
Cc: Swati Sharma <a class="moz-txt-link-rfc2396E" href="mailto:swati2.sharma@intel.com"><swati2.sharma@intel.com></a>

Regards,
Kamil

</pre>
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">+                  fb_id = igt_create_fb(display.drm_fd, mode.hdisplay,
+                                             mode.vdisplay,
+                                             DRM_FORMAT_XRGB2101010,
+                                             DRM_FORMAT_MOD_LINEAR,
+                                             &input_fb_10bit);
+                       igt_assert(fb_id >= 0);
+               }
 
                igt_plane_set_fb(plane, &input_fb);
 
-- 
2.43.0

</pre>
      </blockquote>
    </blockquote>
  </body>
</html>