From 93738c486f76992291b4be268456b0ef682afe8b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 29 Dec 2020 11:16:20 +0100 Subject: [PATCH] fix build warning in queue-5.4/drm-amd-display-prevent-bandwidth-overflow.patch --- ...md-display-prevent-bandwidth-overflow.patch | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/queue-5.4/drm-amd-display-prevent-bandwidth-overflow.patch b/queue-5.4/drm-amd-display-prevent-bandwidth-overflow.patch index ca257584045..cade2beffa0 100644 --- a/queue-5.4/drm-amd-display-prevent-bandwidth-overflow.patch +++ b/queue-5.4/drm-amd-display-prevent-bandwidth-overflow.patch @@ -21,24 +21,21 @@ Reviewed-by: Wenjing Liu Acked-by: Eryk Brol Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin +Signed-off-by: Greg Kroah-Hartman --- - drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + drivers/gpu/drm/amd/display/dc/core/dc_link.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) -diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c -index 47cefc05fd3f5..f933791f1fbbb 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c -@@ -2906,11 +2906,14 @@ uint32_t dc_bandwidth_in_kbps_from_timing( - { - uint32_t bits_per_channel = 0; - uint32_t kbps; -+ struct fixed31_32 link_bw_kbps; +@@ -2909,8 +2909,12 @@ uint32_t dc_bandwidth_in_kbps_from_timin #ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT if (timing->flags.DSC) { - kbps = (timing->pix_clk_100hz * timing->dsc_cfg.bits_per_pixel); - kbps = kbps / 160 + ((kbps % 160) ? 1 : 0); ++ struct fixed31_32 link_bw_kbps; ++ + link_bw_kbps = dc_fixpt_from_int(timing->pix_clk_100hz); + link_bw_kbps = dc_fixpt_div_int(link_bw_kbps, 160); + link_bw_kbps = dc_fixpt_mul_int(link_bw_kbps, timing->dsc_cfg.bits_per_pixel); @@ -46,6 +43,3 @@ index 47cefc05fd3f5..f933791f1fbbb 100644 return kbps; } #endif --- -2.27.0 - -- 2.47.3