drm/i915/dp_mst: Sanitize calculating the DSC DPT bpp limit
authorImre Deak <imre.deak@intel.com>
Tue, 16 Apr 2024 22:10:05 +0000 (01:10 +0300)
committerImre Deak <imre.deak@intel.com>
Fri, 19 Apr 2024 14:20:53 +0000 (17:20 +0300)
commit0f1ceeec1b207a2b2432508b6f4d7fc83842cd0e
tree852db17d4b1cbebb5337d07766cb07e9e9f37fa6
parente54cc6deecceb83d4cd004dc37f0f099c14f82ea
drm/i915/dp_mst: Sanitize calculating the DSC DPT bpp limit

Instead of checking each compressed bpp value against the maximum
DSC/DPT bpp, simplify things by calculating the maximum bpp upfront and
limiting the range of bpps looped over using this maximum.

While at it add a comment about the origin of the DSC/DPT bpp limit.

Bspec: 49259, 68912

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240416221010.376865-7-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp_mst.c