]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/i915/dp: Get optimal link config to have best compressed bpp
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 17 Aug 2023 14:24:57 +0000 (19:54 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Fri, 18 Aug 2023 04:12:24 +0000 (09:42 +0530)
commit1c56e9a39833975c1a3ae8754eb800d039f123ac
tree7eeeb0123f1f3afabbf1c56603d316d6efe10f61
parenta4d30841dee6dc7ea0d5f75d35ea58553d7bd59e
drm/i915/dp: Get optimal link config to have best compressed bpp

Currently, we take the max lane, rate and pipe bpp, to get the maximum
compressed bpp possible. We then set the output bpp to this value.
This patch provides support to have max bpp, min rate and min lanes,
that can support the min compressed bpp.

v2:
-Avoid ending up with compressed bpp, same as pipe bpp. (Stan)
-Fix the checks for limits->max/min_bpp while iterating over list of
 valid DSC bpcs. (Stan)

v3:
-Refactor the code to have pipe bpp/compressed bpp computation and slice
count calculation separately for different cases.

v4:
-Separate the pipe_bpp calculation for eDP and DP.

v5:
-Get rid of magic numbers for max and min bpp,
and improve documentation. (Stan).
-Use functions for {src_sink}_{min_max}_compressed_bpp (Ville).

v6:
-Remove lines to set link config to max.

v7:
-Split the part to separate edp and dp functions for computing DSC BPP
into separate patch.

v8:
-Separate mechanism to get compressed bpp for ICL,TGL and XELPD+.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230817142459.89764-17-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/display/intel_dp.c