public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
	<igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 1/1] tests/chamelium/kms_chamelium_frames: add intel related yuv restrictions
Date: Thu, 26 Mar 2026 12:30:57 +0530	[thread overview]
Message-ID: <d0d1c505-b2c0-49a6-83ec-6a202fc15509@intel.com> (raw)
In-Reply-To: <20260316161101.2808556-2-juhapekka.heikkila@gmail.com>

Hi JP,

If you check randomize_plane_coordinates()

we already have fallback to align YUV to even if random config fails.

However, your patch enabled pre-alignment. Can you please check once?

On 16-03-2026 09:41 pm, Juha-Pekka Heikkila wrote:
> Add intel hw yuv related restriction handling; 16bpp yuv formats
> need to be set at even coordinates and even width. Palanar formats
> need to be at even x/y coordinates and even width/height
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>   tests/chamelium/kms_chamelium_frames.c | 33 +++++++++++++++++++++++++-
>   1 file changed, 32 insertions(+), 1 deletion(-)
>
> diff --git a/tests/chamelium/kms_chamelium_frames.c b/tests/chamelium/kms_chamelium_frames.c
> index efd9ff1b7..404e32b87 100644
> --- a/tests/chamelium/kms_chamelium_frames.c
> +++ b/tests/chamelium/kms_chamelium_frames.c
> @@ -333,6 +333,21 @@ static void randomize_plane_setup(chamelium_data_t *data, igt_plane_t *plane,
>   
>   	*width = max((rand() % mode->hdisplay) + 1, 2 * min_dim);
>   	*height = max((rand() % mode->vdisplay) + 1, 2 * min_dim);
> +
> +	/*
> +	 * intel related restrictions for yuv; 16bpp yuv formats have to be
> +	 * even horizontal width/xposition. Planar yuv formats have to be
> +	 * even horizontal/vertical sizes/coordinates.
> +	 */
> +	if (is_intel_device(data->drm_fd)) {
> +		if (*format == DRM_FORMAT_YUYV || *format == DRM_FORMAT_YVYU ||
> +		    *format == DRM_FORMAT_UYVY || *format == DRM_FORMAT_VYUY)
> +			*width &= ~1;
> +		if (igt_format_is_yuv_semiplanar(*format)) {
> +			*width &= ~1;
> +			*height &= ~1;
> +		}
> +	}
>   }
>   
>   static void configure_plane(igt_plane_t *plane, uint32_t src_w, uint32_t src_h,
> @@ -355,7 +370,8 @@ static void randomize_plane_coordinates(
>   	uint32_t *src_y, uint32_t *crtc_w, uint32_t *crtc_h, int32_t *crtc_x,
>   	int32_t *crtc_y, bool allow_scaling)
>   {
> -	bool is_yuv = igt_format_is_yuv(fb->drm_format);
> +	uint32_t format = fb->drm_format;
> +	bool is_yuv = igt_format_is_yuv(format);
>   	uint32_t width = fb->width, height = fb->height;
>   	double ratio;
>   	int ret;
> @@ -364,6 +380,21 @@ static void randomize_plane_coordinates(
>   	*src_x = rand() % (width / 2);
>   	*src_y = rand() % (height / 2);
>   
> +	/*
> +	 * intel related restrictions for yuv; 16bpp yuv formats have to be
> +	 * even horizontal width/xposition. Planar yuv formats have to be
> +	 * even horizontal/vertical sizes/coordinates.
> +	 */
> +	if (is_intel_device(data->drm_fd)) {
> +		if (format == DRM_FORMAT_YUYV || format == DRM_FORMAT_YVYU ||
> +		    format == DRM_FORMAT_UYVY || format == DRM_FORMAT_VYUY)
> +			*src_x &= ~1;
> +		if (igt_format_is_yuv_semiplanar(format)) {
> +			*src_x &= ~1;
> +			*src_y &= ~1;
> +		}
> +	}
> +
>   	/* The source size only includes the active source area. */
>   	*src_w = width - *src_x;
>   	*src_h = height - *src_y;

  reply	other threads:[~2026-03-26  7:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 16:11 [PATCH i-g-t 0/1] add intel related yuv restrictions to kms_chamelium_frames Juha-Pekka Heikkila
2026-03-16 16:11 ` [PATCH i-g-t 1/1] tests/chamelium/kms_chamelium_frames: add intel related yuv restrictions Juha-Pekka Heikkila
2026-03-26  7:00   ` Sharma, Swati2 [this message]
2026-03-17 12:44 ` ✓ Xe.CI.BAT: success for add intel related yuv restrictions to kms_chamelium_frames Patchwork
2026-03-17 13:59 ` ✓ i915.CI.BAT: " Patchwork
2026-03-18 14:36 ` ✗ i915.CI.Full: failure " Patchwork
2026-03-18 20:08 ` ✗ Xe.CI.FULL: " 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=d0d1c505-b2c0-49a6-83ec-6a202fc15509@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.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