]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/dp: Fail state computation for invalid max sink compressed BPP value
authorImre Deak <imre.deak@intel.com>
Mon, 15 Dec 2025 19:23:55 +0000 (21:23 +0200)
committerImre Deak <imre.deak@intel.com>
Fri, 19 Dec 2025 14:46:41 +0000 (16:46 +0200)
There is no reason to accept an invalid maximum sink compressed BPP
value (i.e. 0), fail the state computation in this case.

Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20251215192357.172201-16-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp.c

index 206184e6ba66bf22d5a975c941eb3c0ad4e952d0..1a645b27820f3017b8b71f43a2696907f4de4a1b 100644 (file)
@@ -2623,8 +2623,7 @@ intel_dp_compute_config_link_bpp_limits(struct intel_dp *intel_dp,
                dsc_sink_max_bpp = intel_dp_dsc_sink_max_compressed_bpp(connector,
                                                                        crtc_state,
                                                                        limits->pipe.max_bpp / 3);
-               dsc_max_bpp = dsc_sink_max_bpp ?
-                             min(dsc_sink_max_bpp, dsc_src_max_bpp) : dsc_src_max_bpp;
+               dsc_max_bpp = min(dsc_sink_max_bpp, dsc_src_max_bpp);
                dsc_max_bpp = min(dsc_max_bpp, joiner_max_bpp);
 
                max_link_bpp_x16 = min(max_link_bpp_x16, fxp_q4_from_int(dsc_max_bpp));