]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix 32-bit divide error in wait_for_alt_mode
authorNathan Chancellor <natechancellor@gmail.com>
Tue, 20 Aug 2019 23:57:13 +0000 (16:57 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 22 Aug 2019 03:18:46 +0000 (22:18 -0500)
commitb6c810caa5eb421ebb5f061378fdc76e5a92646b
tree847b92e64fe5f2a82912d4dce847e608e935c62e
parent3e5ba62030eadca31c2c9d4164034d75865b78e4
drm/amd/display: Fix 32-bit divide error in wait_for_alt_mode

When building arm32 allyesconfig:

ld.lld: error: undefined symbol: __aeabi_uldivmod
>>> referenced by dc_link.c
>>> gpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archive drivers/built-in.a
>>> referenced by dc_link.c
>>> gpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archive drivers/built-in.a

time_taken_in_ns is of type unsigned long long so we need to use div_u64
to avoid this error.

Fixes: 1b1fe43ebe23 ("drm/amd/display: Enable type C hotplug")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c