From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Pranay Samala <pranay.samala@intel.com>, <igt-dev@lists.freedesktop.org>
Cc: <karthik.b.s@intel.com>, <sameer.lattannavar@intel.com>
Subject: Re: [PATCH i-g-t v4 1/2] tests/kms_color: Use explicit YCbCr encoding/range in FB creation
Date: Wed, 3 Jun 2026 11:17:19 +0530 [thread overview]
Message-ID: <dd768531-19d0-47c1-a5e9-9cddcd456fa2@intel.com> (raw)
In-Reply-To: <20260601082410.798948-2-pranay.samala@intel.com>
Hi Pranay
On 01-06-2026 01:54 pm, Pranay Samala wrote:
> Switch framebuffer creation from igt_create_fb() to
> igt_create_fb_with_bo_size() to explicitly specify YCbCr encoding
> and range parameter.
>
> YUV formats may otherwise be interpreted using implicit limited-range
> defaults (16-235) instead of full-range values (0-255). Using explicit
> full-range handling keeps the expected color values deterministic for
> YUV test coverage.
Patch unconditionally passes IGT_COLOR_YCBCR_BT709 /
IGT_COLOR_YCBCR_FULL_RANGE to
all framebuffer creation calls, including those that will only ever use
RGB formats.
Add a helper that applies the YCbCr params conditionally something like
static unsigned int create_color_test_fb(data_t *data, int w, int h,
uint32_t format, struct igt_fb
*fb)
{
if (igt_format_is_yuv(format))
return igt_create_fb_with_bo_size(data->drm_fd, w, h, format,
DRM_FORMAT_MOD_LINEAR,
IGT_COLOR_YCBCR_BT709,
IGT_COLOR_YCBCR_FULL_RANGE,
fb, 0, 0);
return igt_create_fb(data->drm_fd, w, h, format,
DRM_FORMAT_MOD_LINEAR, fb);
}
Also, in commit message mention its a preparation patch. There is nothing
which is getting fixed in this patch.
>
> v3:
> - Update commit message (Swati)
>
> v4:
> - Split the patches (Swati)
>
> Signed-off-by: Pranay Samala <pranay.samala@intel.com>
> ---
> tests/kms_color.c | 128 +++++++++++++++++++++++++++++-----------------
> 1 file changed, 80 insertions(+), 48 deletions(-)
>
> diff --git a/tests/kms_color.c b/tests/kms_color.c
> index 565edb2dc..146181fbb 100644
> --- a/tests/kms_color.c
> +++ b/tests/kms_color.c
> @@ -104,20 +104,28 @@ static bool test_pipe_degamma(data_t *data,
> igt_output_override_mode(output, mode);
>
> /* Create a framebuffer at the size of the output. */
> - fb_id = igt_create_fb(data->drm_fd,
> - mode->hdisplay,
> - mode->vdisplay,
> - data->drm_format,
> - DRM_FORMAT_MOD_LINEAR,
> - &fb);
> + fb_id = igt_create_fb_with_bo_size(data->drm_fd,
> + mode->hdisplay,
> + mode->vdisplay,
> + data->drm_format,
> + DRM_FORMAT_MOD_LINEAR,
> + IGT_COLOR_YCBCR_BT709,
> + IGT_COLOR_YCBCR_FULL_RANGE,
> + &fb,
> + 0,
> + 0);
> igt_assert(fb_id);
>
> - fb_modeset_id = igt_create_fb(data->drm_fd,
> - mode->hdisplay,
> - mode->vdisplay,
> - data->drm_format,
> - DRM_FORMAT_MOD_LINEAR,
> - &fb_modeset);
> + fb_modeset_id = igt_create_fb_with_bo_size(data->drm_fd,
> + mode->hdisplay,
> + mode->vdisplay,
> + data->drm_format,
> + DRM_FORMAT_MOD_LINEAR,
> + IGT_COLOR_YCBCR_BT709,
> + IGT_COLOR_YCBCR_FULL_RANGE,
> + &fb_modeset,
> + 0,
> + 0);
> igt_assert(fb_modeset_id);
>
> igt_plane_set_fb(primary, &fb_modeset);
> @@ -191,20 +199,28 @@ static bool test_pipe_gamma(data_t *data,
> igt_output_override_mode(output, mode);
>
> /* Create a framebuffer at the size of the output. */
> - fb_id = igt_create_fb(data->drm_fd,
> - mode->hdisplay,
> - mode->vdisplay,
> - data->drm_format,
> - DRM_FORMAT_MOD_LINEAR,
> - &fb);
> + fb_id = igt_create_fb_with_bo_size(data->drm_fd,
> + mode->hdisplay,
> + mode->vdisplay,
> + data->drm_format,
> + DRM_FORMAT_MOD_LINEAR,
> + IGT_COLOR_YCBCR_BT709,
> + IGT_COLOR_YCBCR_FULL_RANGE,
> + &fb,
> + 0,
> + 0);
> igt_assert(fb_id);
>
> - fb_modeset_id = igt_create_fb(data->drm_fd,
> - mode->hdisplay,
> - mode->vdisplay,
> - data->drm_format,
> - DRM_FORMAT_MOD_LINEAR,
> - &fb_modeset);
> + fb_modeset_id = igt_create_fb_with_bo_size(data->drm_fd,
> + mode->hdisplay,
> + mode->vdisplay,
> + data->drm_format,
> + DRM_FORMAT_MOD_LINEAR,
> + IGT_COLOR_YCBCR_BT709,
> + IGT_COLOR_YCBCR_FULL_RANGE,
> + &fb_modeset,
> + 0,
> + 0);
> igt_assert(fb_modeset_id);
>
> igt_plane_set_fb(primary, &fb_modeset);
> @@ -285,20 +301,28 @@ static bool test_pipe_legacy_gamma(data_t *data,
> igt_output_override_mode(output, mode);
>
> /* Create a framebuffer at the size of the output. */
> - fb_id = igt_create_fb(data->drm_fd,
> - mode->hdisplay,
> - mode->vdisplay,
> - DRM_FORMAT_XRGB8888,
> - DRM_FORMAT_MOD_LINEAR,
> - &fb);
> + fb_id = igt_create_fb_with_bo_size(data->drm_fd,
> + mode->hdisplay,
> + mode->vdisplay,
> + DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_MOD_LINEAR,
> + IGT_COLOR_YCBCR_BT709,
> + IGT_COLOR_YCBCR_FULL_RANGE,
> + &fb,
> + 0,
> + 0);
> igt_assert(fb_id);
>
> - fb_modeset_id = igt_create_fb(data->drm_fd,
> - mode->hdisplay,
> - mode->vdisplay,
> - DRM_FORMAT_XRGB8888,
> - DRM_FORMAT_MOD_LINEAR,
> - &fb_modeset);
> + fb_modeset_id = igt_create_fb_with_bo_size(data->drm_fd,
> + mode->hdisplay,
> + mode->vdisplay,
> + DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_MOD_LINEAR,
> + IGT_COLOR_YCBCR_BT709,
> + IGT_COLOR_YCBCR_FULL_RANGE,
> + &fb_modeset,
> + 0,
> + 0);
> igt_assert(fb_modeset_id);
>
> igt_plane_set_fb(primary, &fb_modeset);
> @@ -520,20 +544,28 @@ static bool test_pipe_ctm(data_t *data,
> igt_output_override_mode(output, mode);
>
> /* Create a framebuffer at the size of the output. */
> - fb_id = igt_create_fb(data->drm_fd,
> - mode->hdisplay,
> - mode->vdisplay,
> - data->drm_format,
> - DRM_FORMAT_MOD_LINEAR,
> - &fb);
> + fb_id = igt_create_fb_with_bo_size(data->drm_fd,
> + mode->hdisplay,
> + mode->vdisplay,
> + data->drm_format,
> + DRM_FORMAT_MOD_LINEAR,
> + IGT_COLOR_YCBCR_BT709,
> + IGT_COLOR_YCBCR_FULL_RANGE,
> + &fb,
> + 0,
> + 0);
> igt_assert(fb_id);
>
> - fb_modeset_id = igt_create_fb(data->drm_fd,
> - mode->hdisplay,
> - mode->vdisplay,
> - data->drm_format,
> - DRM_FORMAT_MOD_LINEAR,
> - &fb_modeset);
> + fb_modeset_id = igt_create_fb_with_bo_size(data->drm_fd,
> + mode->hdisplay,
> + mode->vdisplay,
> + data->drm_format,
> + DRM_FORMAT_MOD_LINEAR,
> + IGT_COLOR_YCBCR_BT709,
> + IGT_COLOR_YCBCR_FULL_RANGE,
> + &fb_modeset,
> + 0,
> + 0);
> igt_assert(fb_modeset_id);
> igt_plane_set_fb(primary, &fb_modeset);
>
next prev parent reply other threads:[~2026-06-03 5:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 8:24 [PATCH i-g-t v4 0/2] Enable multi-format testing for pipe color tests Pranay Samala
2026-06-01 8:24 ` [PATCH i-g-t v4 1/2] tests/kms_color: Use explicit YCbCr encoding/range in FB creation Pranay Samala
2026-06-03 5:47 ` Sharma, Swati2 [this message]
2026-06-01 8:24 ` [PATCH i-g-t v4 2/2] tests/kms_color: Add multi-format coverage for pipe color tests Pranay Samala
2026-06-03 7:08 ` Sharma, Swati2
2026-06-01 13:53 ` ✓ i915.CI.BAT: success for Enable multi-format testing " Patchwork
2026-06-01 14:06 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-01 17:34 ` ✗ Xe.CI.FULL: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd768531-19d0-47c1-a5e9-9cddcd456fa2@intel.com \
--to=swati2.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=karthik.b.s@intel.com \
--cc=pranay.samala@intel.com \
--cc=sameer.lattannavar@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox