]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/dp: Add missing slice count check during mode validation
authorImre Deak <imre.deak@intel.com>
Mon, 16 Feb 2026 07:04:18 +0000 (09:04 +0200)
committerImre Deak <imre.deak@intel.com>
Tue, 17 Feb 2026 14:20:57 +0000 (16:20 +0200)
Add the missing check for a valid slice count during
mode validation when DSC is enabled.

Cc: Vinod Govindapillai <vinod.govindapillai@intel.com>
Fixes: 745395b51c26 ("drm/i915/dp: Add intel_dp_mode_valid_with_dsc()")
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260216070421.714884-2-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp.c

index b5fe7d8ba5864e905671108900f7c26104d5e2d8..d1caa20370123e06f275a753b939b86f2827ab78 100644 (file)
@@ -2595,6 +2595,9 @@ bool intel_dp_mode_valid_with_dsc(struct intel_connector *connector,
        if (min_bpp_x16 <= 0 || min_bpp_x16 > max_bpp_x16)
                return false;
 
+       if (dsc_slice_count == 0)
+               return false;
+
        return is_bw_sufficient_for_dsc_config(intel_dp,
                                               link_clock, lane_count,
                                               mode_clock, mode_hdisplay,