aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3907-drm-amdgpu-display-fix-64-bit-divide.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3907-drm-amdgpu-display-fix-64-bit-divide.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3907-drm-amdgpu-display-fix-64-bit-divide.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3907-drm-amdgpu-display-fix-64-bit-divide.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3907-drm-amdgpu-display-fix-64-bit-divide.patch
new file mode 100644
index 00000000..75c1c08c
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3907-drm-amdgpu-display-fix-64-bit-divide.patch
@@ -0,0 +1,31 @@
+From e6231755f2a46ffa80c9990005de1a5b7fd82279 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Fri, 20 Sep 2019 15:13:24 -0500
+Subject: [PATCH 3907/4256] drm/amdgpu/display: fix 64 bit divide
+
+Use proper helper for 32 bit.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Harry Wentland <harry.wentland@amd.com>
+---
+ .../gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
+index 36277bca0326..b1e657e137a9 100644
+--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
++++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c
+@@ -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;
+--
+2.17.1
+