Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arun R Murthy <arun.r.murthy@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: suraj.kandpal@intel.com, ankit.k.nautiyal@intel.com,
	Arun R Murthy <arun.r.murthy@intel.com>
Subject: [PATCH] drm/i915/scaler: Prune YUV420 modes against the max source width
Date: Wed,  7 Oct 2026 12:36:01 +0530	[thread overview]
Message-ID: <20261007070601.3611674-1-arun.r.murthy@intel.com> (raw)

skl_scaler_mode_valid() compares the mode's hdisplay against the pipe
scaler maximum source height instead of the maximum source width, so
single pipe YUV420 modes are pruned against the wrong limit.

Commit 3347b55f2c6c ("drm/i915/xe3lpd: Prune modes for YUV420") intended
to reject modes whose hdisplay exceeds the scaler horizontal source
limit, since pipe scaling does not support YUV420 for a source width
above 4096. Comparing against max_h makes the check far too permissive
from display 12 onwards, where max_h is 8192, and too strict on display
11, where max_h is 4096 while the horizontal limit is 5120.

Compare against max_w instead.

Fixes: 3347b55f2c6c ("drm/i915/xe3lpd: Prune modes for YUV420")
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 drivers/gpu/drm/i915/display/skl_scaler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c
index 7994b983d509..7e65c4fffbc0 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;
 	}
 
-- 
2.25.1


             reply	other threads:[~2026-10-07  7:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07  7:06 Arun R Murthy [this message]
2026-10-07  7:17 ` [PATCH] drm/i915/scaler: Prune YUV420 modes against the max source width sashiko-bot
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=20261007070601.3611674-1-arun.r.murthy@intel.com \
    --to=arun.r.murthy@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=suraj.kandpal@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