drm/amdgpu/display: fix 64 bit divide
Subsystems (3)
PATCH 1/1 drm/amdgpu/display: fix 64 bit divide
Use proper helper for 32 bit.
Signed-off-by Alex Deucher <[email protected]>
--- .../gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c +3 -1
@@ -197,7 +197,9 @@ void dce11_pplib_apply_display_requirements(*/ if (ASICREV_IS_VEGA20_P (dc->ctx->asic_id.hw_internal_rev) && (context->stream_count >=2 )) { pp_display_cfg->min_memory_clock_khz =max (pp_display_cfg->min_memory_clock_khz, - (uint32_t ) (dc->bw_vbios->high_yclk.value / memory_type_multiplier /10000 )); + (uint32_t )div64_s64 ( +div64_s64 (dc->bw_vbios->high_yclk.value, + memory_type_multiplier),10000 )); }else { pp_display_cfg->min_memory_clock_khz = context->bw_ctx.bw.dce.yclk_khz / memory_type_multiplier;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20190920201812.3763-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Harry Wentland
Reviewed-byQuoted 3 lines · Alex Deucher
Use proper helper for 32 bit.
Signed-off-by Alex Deucher <[email protected]>
Reviewed-by Harry Wentland <[email protected]>
Harry
Quoted 10 lines
--- .../gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c +0
-0
drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c void dce11_pplib_apply_display_requirements( · line 205
Quoted 10 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c +3
-1@@ -197,7 +197,9 @@ void dce11_pplib_apply_display_requirements(*/ if (ASICREV_IS_VEGA20_P (dc->ctx->asic_id.hw_internal_rev) && (context->stream_count >=2 )) { pp_display_cfg->min_memory_clock_khz =max (pp_display_cfg->min_memory_clock_khz, - (uint32_t ) (dc->bw_vbios->high_yclk.value / memory_type_multiplier /10000 )); + (uint32_t )div64_s64 ( +div64_s64 (dc->bw_vbios->high_yclk.value, + memory_type_multiplier),10000 )); }else { pp_display_cfg->min_memory_clock_khz = context->bw_ctx.bw.dce.yclk_khz / memory_type_multiplier;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx