Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Arun R Murthy" <arun.r.murthy@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/scaler: Prune YUV420 modes against the max source width
Date: Thu, 08 Oct 2026 04:30:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-163611@kernel.org> (raw)
In-Reply-To: <20261008041809.3674538-1-arun.r.murthy@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] drm/i915/scaler: missing vdisplay check against scaler max_h for YUV420
--

commit 3cf07aa18b1a8b7c70fe1209cb20db9d2d636b86
Author: Arun R Murthy <arun.r.murthy@intel.com>

drm/i915/scaler: Prune YUV420 modes against the max source width

This commit fixes skl_scaler_mode_valid() to compare the mode's horizontal
resolution against the scaler's maximum width instead of the maximum height.
This prevents single-pipe YUV420 modes from being improperly pruned against
the wrong limit.

> diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c
> index 7994b983d509d..7e65c4fffbc0c 100644
> --- a/drivers/gpu/drm/i915/display/skl_scaler.c
> +++ b/drivers/gpu/drm/i915/display/skl_scaler.c
> @@ -145,7 +145,7 @@ skl_scaler_mode_valid(struct intel_display *display,
>  
>  	if (num_joined_pipes < 2 && output_format == INTEL_OUTPUT_FORMAT_YCBCR420) {
>  		skl_scaler_max_src_size(display, &max_w, &max_h);
> -		if (mode->hdisplay > max_h)
> +		if (mode->hdisplay > max_w)
>  			return MODE_NO_420;
>  	}

[Severity: Low]
Does this code also need to validate the vertical display size? It looks like
max_h is fetched from skl_scaler_max_src_size() but never validated against
mode->vdisplay.

If a YCbCr420 mode has a vdisplay that exceeds the scaler's maximum supported
height, it appears it would pass early mode pruning here, but any attempt to
set it would fail later with -EINVAL during the atomic commit phase in
skl_update_scaler(). For example, on Gen11 platforms, max_h is capped at
4096, but intel_mode_valid_max_plane_size() permits vdisplay up to 4320.
Should a check against max_h be added here as well?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261008041809.3674538-1-arun.r.murthy@intel.com?part=1

  reply	other threads:[~2026-10-08  4:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08  4:18 [PATCH] drm/i915/scaler: Prune YUV420 modes against the max source width Arun R Murthy
2026-10-08  4:30 ` sashiko-bot [this message]
2026-10-08  5:08 ` ✓ i915.CI.BAT: success for drm/i915/scaler: Prune YUV420 modes against the max source width (rev2) Patchwork
2026-10-08  9:45 ` ✓ i915.CI.Full: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2026-10-07  7:06 [PATCH] drm/i915/scaler: Prune YUV420 modes against the max source width Arun R Murthy
2026-10-07  7:17 ` sashiko-bot
2026-10-07  8:03 ` Kandpal, Suraj
2026-10-08 14:07   ` Jani Nikula

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=sashiko-outbox-163611@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=arun.r.murthy@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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