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: b5b1f45549
("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>
This commit is contained in:

committed by
Alex Deucher

parent
5a6a4c9d1b
commit
b859c579cd
@@ -721,7 +721,7 @@ bool wait_for_alt_mode(struct dc_link *link)
|
|||||||
time_taken_in_ns = dm_get_elapse_time_in_ns(
|
time_taken_in_ns = dm_get_elapse_time_in_ns(
|
||||||
link->ctx, finish_timestamp, enter_timestamp);
|
link->ctx, finish_timestamp, enter_timestamp);
|
||||||
DC_LOG_WARNING("Alt mode entered finished after %llu ms\n",
|
DC_LOG_WARNING("Alt mode entered finished after %llu ms\n",
|
||||||
time_taken_in_ns / 1000000);
|
div_u64(time_taken_in_ns, 1000000));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -730,7 +730,7 @@ bool wait_for_alt_mode(struct dc_link *link)
|
|||||||
time_taken_in_ns = dm_get_elapse_time_in_ns(link->ctx, finish_timestamp,
|
time_taken_in_ns = dm_get_elapse_time_in_ns(link->ctx, finish_timestamp,
|
||||||
enter_timestamp);
|
enter_timestamp);
|
||||||
DC_LOG_WARNING("Alt mode has timed out after %llu ms\n",
|
DC_LOG_WARNING("Alt mode has timed out after %llu ms\n",
|
||||||
time_taken_in_ns / 1000000);
|
div_u64(time_taken_in_ns, 1000000));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user