Skip to content

Commit 230b19b

Browse files
jnikularodrigovivi
authored andcommitted
drm/i915/dp: Iterate DSC BPP from high to low on all platforms
Commit 1c56e9a ("drm/i915/dp: Get optimal link config to have best compressed bpp") tries to find the best compressed bpp for the link. However, it iterates from max to min bpp on display 13+, and from min to max on other platforms. This presumably leads to minimum compressed bpp always being chosen on display 11-12. Iterate from high to low on all platforms to actually use the best possible compressed bpp. Fixes: 1c56e9a ("drm/i915/dp: Get optimal link config to have best compressed bpp") Cc: Ankit Nautiyal <[email protected]> Cc: Imre Deak <[email protected]> Cc: <[email protected]> # v6.7+ Reviewed-by: Imre Deak <[email protected]> Reviewed-by: Ankit Nautiyal <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/3bba67923cbcd13a59d26ef5fa4bb042b13c8a9b.1738327620.git.jani.nikula@intel.com (cherry picked from commit 56b0337) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 3cf3ec9 commit 230b19b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,11 +2072,10 @@ icl_dsc_compute_link_config(struct intel_dp *intel_dp,
20722072
/* Compressed BPP should be less than the Input DSC bpp */
20732073
dsc_max_bpp = min(dsc_max_bpp, pipe_bpp - 1);
20742074

2075-
for (i = 0; i < ARRAY_SIZE(valid_dsc_bpp); i++) {
2076-
if (valid_dsc_bpp[i] < dsc_min_bpp)
2075+
for (i = ARRAY_SIZE(valid_dsc_bpp) - 1; i >= 0; i--) {
2076+
if (valid_dsc_bpp[i] < dsc_min_bpp ||
2077+
valid_dsc_bpp[i] > dsc_max_bpp)
20772078
continue;
2078-
if (valid_dsc_bpp[i] > dsc_max_bpp)
2079-
break;
20802079

20812080
ret = dsc_compute_link_config(intel_dp,
20822081
pipe_config,

0 commit comments

Comments
 (0)