summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c
diff options
context:
space:
mode:
authorClay King <clayking@amd.com>2025-08-14 23:58:15 +0300
committerAlex Deucher <alexander.deucher@amd.com>2025-08-27 20:57:50 +0300
commit9ec77e3a4b8913508bfd10891ce339af05e671ef (patch)
treeed944aa03da9157ec99aaca5585665dcfe8755ba /drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c
parent8a359f0f138d5ac7ceffd21b73279be50e516c0a (diff)
downloadlinux-9ec77e3a4b8913508bfd10891ce339af05e671ef.tar.xz
drm/amd/display: Multiplication result converted to larger type
Consolidating multiple CodeQL Fixes for alerts with rule id: cpp/integer-multiplication-cast-to-long Reviewed-by: Joshua Aberback <joshua.aberback@amd.com> Signed-off-by: Clay King <clayking@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c
index d897f8a30ede..4da5adab799c 100644
--- a/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c
+++ b/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c
@@ -1136,7 +1136,7 @@ static void calculate_bandwidth(
}
}
}
- data->total_dmifmc_urgent_trips = bw_ceil2(bw_div(data->total_requests_for_adjusted_dmif_size, (bw_add(dceip->dmif_request_buffer_size, bw_int_to_fixed(vbios->number_of_request_slots_gmc_reserves_for_dmif_per_channel * data->number_of_dram_channels)))), bw_int_to_fixed(1));
+ data->total_dmifmc_urgent_trips = bw_ceil2(bw_div(data->total_requests_for_adjusted_dmif_size, (bw_add(dceip->dmif_request_buffer_size, bw_int_to_fixed((uint64_t)vbios->number_of_request_slots_gmc_reserves_for_dmif_per_channel * data->number_of_dram_channels)))), bw_int_to_fixed(1));
data->total_dmifmc_urgent_latency = bw_mul(vbios->dmifmc_urgent_latency, data->total_dmifmc_urgent_trips);
data->total_display_reads_required_data = bw_int_to_fixed(0);
data->total_display_reads_required_dram_access_data = bw_int_to_fixed(0);