summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dsc
diff options
context:
space:
mode:
authorLeo (Hanghong) Ma <hanghong.ma@amd.com>2024-01-04 21:29:32 +0300
committerAlex Deucher <alexander.deucher@amd.com>2024-01-23 01:13:26 +0300
commitc597479f27b6b96c61c70cb25b5e1a4f9ea4c7f7 (patch)
treec5a8cb3770497f943e44be173905b1d8f607a392 /drivers/gpu/drm/amd/display/dc/dsc
parentaa708057c410175879dcdcdc8bdccd9b1f06e413 (diff)
downloadlinux-c597479f27b6b96c61c70cb25b5e1a4f9ea4c7f7.tar.xz
drm/amd/display: Fix timing bandwidth calculation for HDMI
[Why && How] The current bandwidth calculation for timing doesn't account for certain HDMI modes overhead which leads to DSC can't be enabled. Add support to calculate the actual bandwidth for these HDMI modes. Reviewed-by: Chris Park <chris.park@amd.com> Acked-by: Roman Li <roman.li@amd.com> Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dsc')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c
index 0df6c55eb326..ac41f9c0a283 100644
--- a/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c
+++ b/drivers/gpu/drm/amd/display/dc/dsc/dc_dsc.c
@@ -137,6 +137,11 @@ uint32_t dc_bandwidth_in_kbps_from_timing(
if (link_encoding == DC_LINK_ENCODING_DP_128b_132b)
kbps = apply_128b_132b_stream_overhead(timing, kbps);
+ if (link_encoding == DC_LINK_ENCODING_HDMI_FRL &&
+ timing->vic == 0 && timing->hdmi_vic == 0 &&
+ timing->frl_uncompressed_video_bandwidth_in_kbps != 0)
+ kbps = timing->frl_uncompressed_video_bandwidth_in_kbps;
+
return kbps;
}