On 2/6/2026 4:12 PM, Imre Deak wrote:
Ensure that the pipe BPP range is valid after calculating the minimum
and maximum pipe BPP values separately.

Signed-off-by: Imre Deak <[email protected]>

Reviewed-by: Ankit Nautiyal <[email protected]>


---
  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 4d8f480cf803f..720787e86ff17 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2736,6 +2736,15 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
                                    limits->pipe.min_bpp, limits->pipe.max_bpp);
        }
+ 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;

Reply via email to