]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/radeon: fix 64 bit divide in SI spm code
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 1 Aug 2013 13:03:29 +0000 (09:03 -0400)
committerDave Airlie <airlied@gmail.com>
Sun, 4 Aug 2013 01:03:14 +0000 (11:03 +1000)
Forgot to use the appropriate math64 function.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
drivers/gpu/drm/radeon/si_dpm.c

index 7ad22e87cd62aab0e4d990de3a72641c29310e55..41825575b403bab2b5e16b3fba33a33d3187f4f7 100644 (file)
@@ -1767,7 +1767,7 @@ static void si_calculate_leakage_for_v_and_t_formula(const struct ni_leakage_coe
        s64 temperature, t_slope, t_intercept, av, bv, t_ref;
        s64 tmp;
 
-       i_leakage = drm_int2fixp(ileakage) / 100;
+       i_leakage = div64_s64(drm_int2fixp(ileakage), 100);
        vddc = div64_s64(drm_int2fixp(v), 1000);
        temperature = div64_s64(drm_int2fixp(t), 1000);