From: sashiko-bot@kernel.org
To: "Arun R Murthy" <arun.r.murthy@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/scaler: Prune YUV420 modes against the max source width
Date: Wed, 07 Oct 2026 07:17:32 +0000 [thread overview]
Message-ID: <sashiko-outbox-162702@kernel.org> (raw)
In-Reply-To: <20261007070601.3611674-1-arun.r.murthy@intel.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] drm/i915/scaler: missing vertical limit check for YUV420 modes
- [Medium] drm/i915/scaler: invalid joined pipe modes exposed due to skipped scaler limit check
--
commit 59a282a072c72ed078bc3b442b7aded1b908a674
Author: Arun R Murthy <arun.r.murthy@intel.com>
drm/i915/scaler: Prune YUV420 modes against the max source width
This commit updates the YUV420 mode validation in skl_scaler_mode_valid to
check the horizontal dimension against max_w instead of max_h. This fixes an
issue where single-pipe YUV420 modes were being evaluated against the vertical
scaler limits.
> 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) {
[Severity: Medium]
By restricting this check to num_joined_pipes < 2, does this bypass the
scaler limit check for joined pipe modes?
When using Bigjoiner or Ultrajoiner (num_joined_pipes >= 2), the effective
per-pipe source width is mode->hdisplay / num_joined_pipes. If this effective
width still exceeds max_w, the mode will pass mode_valid but fail later
during the atomic_check phase in skl_update_scaler, potentially causing a
failed modeset or black screen.
> skl_scaler_max_src_size(display, &max_w, &max_h);
> - if (mode->hdisplay > max_h)
> + if (mode->hdisplay > max_w)
[Severity: Medium]
Does this code also need to validate the vertical dimension against max_h?
The function skl_scaler_max_src_size populates both max_w and max_h, but only
the horizontal dimension is checked. On Display 11, a maximum height up to
4320 is allowed by intel_mode_valid_max_plane_size, but the scaler's max_h
limit is 4096.
If a YUV420 mode with a vdisplay greater than 4096 is evaluated, it will pass
this check but could fail with -EINVAL during atomic commit in
skl_update_scaler when src_h exceeds the scaler limits.
> return MODE_NO_420;
> }
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261007070601.3611674-1-arun.r.murthy@intel.com?part=1
next prev parent reply other threads:[~2026-10-07 7:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-10-07 7:58 ` ✓ i915.CI.BAT: success for " Patchwork
2026-10-07 8:03 ` [PATCH] " Kandpal, Suraj
2026-10-08 14:07 ` Jani Nikula
2026-10-07 10:42 ` ✓ i915.CI.Full: success for " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-10-08 4:18 [PATCH] " Arun R Murthy
2026-10-08 4:30 ` sashiko-bot
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-162702@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