From 85bd5162a986fa9a149fe208a947e89fea37c479 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 4 Mar 2024 02:30:03 +0000 Subject: [PATCH] drm/amd/display: Avoid enum conversion warning From Nathan Chancellor a1baf5734231dd3ee5d98022b2da474bc972f9c7 in linux-6.6.y/6.6.19 d7643fe6fb76edb1f2f1497bf5e8b8f4774b5129 in mainline linux --- .../pci/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c index 5269368d14d..7a6e42bde29 100644 --- a/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c +++ b/sys/dev/pci/drm/amd/display/dc/link/protocols/link_dp_dpia_bw.c @@ -544,8 +544,9 @@ int link_dp_dpia_get_dp_overhead_in_dp_tunneling(struct dc_link *link) */ const struct dc_link_settings *link_cap = dc_link_get_link_cap(link); - uint32_t link_bw_in_kbps = - link_cap->link_rate * link_cap->lane_count * LINK_RATE_REF_FREQ_IN_KHZ * 8; + uint32_t link_bw_in_kbps = (uint32_t)link_cap->link_rate * + (uint32_t)link_cap->lane_count * + LINK_RATE_REF_FREQ_IN_KHZ * 8; link_mst_overhead = (link_bw_in_kbps / 64) + ((link_bw_in_kbps % 64) ? 1 : 0); } -- 2.20.1