public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Subject: [PATCH v2 2/2] drm/i915/dp: Verify valid pipe BPP range
Date: Mon, 9 Feb 2026 15:38:17 +0200	[thread overview]
Message-ID: <20260209133817.395823-2-imre.deak@intel.com> (raw)
In-Reply-To: <20260209133817.395823-1-imre.deak@intel.com>

Ensure that the pipe BPP range is valid after calculating the minimum
and maximum pipe BPP values separately.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 7fd20df10f26f..48845899298e4 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2745,6 +2745,15 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
 								     crtc_state)));
 	}
 
+	if (limits->pipe.min_bpp <= 0 ||
+	    limits->pipe.min_bpp > limits->pipe.max_bpp) {
+		drm_dbg_kms(display->drm, "[CONNECTOR:%d:%s] Invalid pipe bpp range: %d-%d\n",
+			    connector->base.base.id, connector->base.name,
+			    limits->pipe.min_bpp, limits->pipe.max_bpp);
+
+		return false;
+	}
+
 	if (dsc && !intel_dp_dsc_compute_pipe_bpp_limits(connector, limits))
 		return false;
 
-- 
2.49.1


  reply	other threads:[~2026-02-09 13:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 13:38 [PATCH v2 1/2] drm/i915/dp: Fix pipe BPP clamping due to HDR Imre Deak
2026-02-09 13:38 ` Imre Deak [this message]
2026-02-09 13:44 ` ✓ CI.KUnit: success for series starting with [v2,1/2] " Patchwork
2026-02-09 14:18 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-09 14:28 ` [PATCH v2 1/2] " Borah, Chaitanya Kumar
2026-02-09 15:40   ` Imre Deak
2026-02-10  6:14     ` Borah, Chaitanya Kumar
2026-02-09 17:17 ` ✗ Xe.CI.FULL: failure for series starting with [v2,1/2] " Patchwork
     [not found] ` <177067695572.239579.15984876432204423723@a3b018990fe9>
2026-02-10  9:55   ` ✗ i915.CI.Full: " Imre Deak

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=20260209133817.395823-2-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /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