]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 4 Aug 2013 18:44:18 +0000 (11:44 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 4 Aug 2013 18:44:18 +0000 (11:44 -0700)
Pull drm fix from Dave Airlie:
 "Just a quick fix that a few people have reported, be nice to have in
  asap"

The drm tree seems to be very confused about 64-bit divides.  Here it
uses a slow 64-by-64 bit divide to divide by a small constant.  Oh well.
Doesn't look performance-critical, just stupid.

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/radeon: fix 64 bit divide in SI spm code

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);