linux/drivers/gpu/drm/amd
Arnd Bergmann 6a53b31349 drm: powerplay: use div64_s64 instead of do_div
The newly added code for Fiji creates a correct compiler warning
about invalid use of the do_div macro:

In file included from powerplay/hwmgr/ppatomctrl.c:31:0:
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppevvmath.h: In function 'fDivide':
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppevvmath.h:382:89: warning: comparison of distinct pointer types lacks a cast
     do_div(longlongX, longlongY); /*Q(32,32) divided by Q(16,16) = Q(16,16) Back to original format */

do_div() divides an unsigned 64-bit number by an unsigned 32-bit number.
The code instead wants to divide two signed 64-bit numbers, which is done
using the div64_s64 function.

Reviewed-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 770911a3cf ("drm/amd/powerplay: add/update headers for Fiji SMU and DPM")
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-01-04 10:36:58 -05:00
..
amdgpu Backmerge drm-fixes merge into Linus's tree into drm-next. 2015-12-24 08:08:47 +10:00
amdkfd amdkfd: use <linux/mman.h> instead of <uapi/asm-generic/mman-common.h> 2015-08-30 12:36:58 +03:00
include drm/amd/powerplay: fix boolreturn.cocci warnings 2015-12-21 16:42:34 -05:00
powerplay drm: powerplay: use div64_s64 instead of do_div 2016-01-04 10:36:58 -05:00
scheduler drm/amdgpu: add entity only when first job come 2015-12-14 19:41:19 -05:00