drm/amd/display: Fix 32-bit divide error in wait_for_alt_mode
Subsystems (3)
PATCH 1/1 drm/amd/display: Fix 32-bit divide error in wait_for_alt_mode
When building arm32 allyesconfig:
ld.lld: error: undefined symbol: __aeabi_uldivmod
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
referenced by
dc_link.cgpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archivedrivers/built-in.areferenced bydc_link.cgpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archivedrivers/built-in.a
time_taken_in_ns is of type unsigned long long so we need to use div_u64 to avoid this error.
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_link.c +2 -2
@@ -721,7 +721,7 @@ bool wait_for_alt_mode(struct dc_link *link) time_taken_in_ns =dm_get_elapse_time_in_ns ( link->ctx, finish_timestamp, enter_timestamp);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; }
@@ -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, enter_timestamp);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; }
Signature · 1 line
2.23.0
Quoted 8 lines · Nathan Chancellor
When building arm32 allyesconfig:
ld.lld: error: undefined symbol:
__aeabi_uldivmodQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
referenced by
dc_link.cgpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archivedrivers/built-in.areferenced bydc_link.cgpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archivedrivers/built-in.a
Quoted 6 lines
time_taken_in_nsis of type unsigned long long so we need to usediv_u64to avoid this error.Fixes b5b1f4554904 ("drm/amd/display: Enable type C hotplug")Reported-by Randy Dunlap <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>
Thanks.
Quoted 27 lines
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/dc/core/dc_link.c +2
-2@@ -721,7 +721,7 @@ bool wait_for_alt_mode(struct dc_link *link) time_taken_in_ns =dm_get_elapse_time_in_ns ( link->ctx, finish_timestamp, enter_timestamp);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; }@@ -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, enter_timestamp);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; }
Signature · 1 line
~Randy
Quoted 8 lines · Nathan Chancellor
When building arm32 allyesconfig:
ld.lld: error: undefined symbol:
__aeabi_uldivmodQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
referenced by
dc_link.cgpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archivedrivers/built-in.areferenced bydc_link.cgpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archivedrivers/built-in.a
Quoted 6 lines
time_taken_in_nsis of type unsigned long long so we need to usediv_u64to avoid this error.Fixes b5b1f4554904 ("drm/amd/display: Enable type C hotplug")Reported-by Randy Dunlap <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>
Harry
Quoted 19 lines
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/dc/core/dc_link.c +1
-1@@ -721,7 +721,7 @@ bool wait_for_alt_mode(struct dc_link *link) time_taken_in_ns =dm_get_elapse_time_in_ns ( link->ctx, finish_timestamp, enter_timestamp);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; }
drivers/gpu/drm/amd/display/dc/core/dc_link.c bool wait_for_alt_mode(struct dc_link *link) · line 736
Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1
-1@@ -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, enter_timestamp);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; }
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Alex Deucher
AppliedApplied. thanks!
Alex
Quoted 52 lines · Harry Wentland
Quoted 8 lines · Nathan Chancellor
When building arm32 allyesconfig:
ld.lld: error: undefined symbol:
__aeabi_uldivmodQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
referenced by
dc_link.cgpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archivedrivers/built-in.areferenced bydc_link.cgpu/drm/amd/display/dc/core/dc_link.o:(wait_for_alt_mode) in archivedrivers/built-in.aQuoted 6 lines
time_taken_in_nsis of type unsigned long long so we need to usediv_u64to avoid this error.Fixes b5b1f4554904 ("drm/amd/display: Enable type C hotplug")Reported-by Randy Dunlap <[email protected]>Signed-off-by Nathan Chancellor <[email protected]>Reviewed-by Harry Wentland <[email protected]>Harry
Quoted 19 lines
--- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/dc/core/dc_link.c +1
-1@@ -721,7 +721,7 @@ bool wait_for_alt_mode(struct dc_link *link) time_taken_in_ns =dm_get_elapse_time_in_ns ( link->ctx, finish_timestamp, enter_timestamp);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; }drivers/gpu/drm/amd/display/dc/core/dc_link.c bool wait_for_alt_mode(struct dc_link *link) · line 736
Quoted 8 lines
drivers/gpu/drm/amd/display/dc/core/dc_link.c +1
-1@@ -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, enter_timestamp);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; }_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx