ERROR: "__udivdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! Signed-off-by: Rex Zhu <Rex.Zhu at amd.com> --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index 5e12e46..d1f57d0 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -616,6 +616,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync, unsigned int refresh_range = 0; unsigned int min_refresh_in_uhz = 0; unsigned int max_refresh_in_uhz = 0; + unsigned long long tmp; if (mod_freesync == NULL) return; @@ -646,8 +647,8 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync, * calculated from pixel rate and vertical/horizontal totals, but * this should be allowed instead of blocking FreeSync. */ - if ((min_refresh_in_uhz / 1000000) > - ((nominal_field_rate_in_uhz + 1000000 - 1) / 1000000)) + tmp = div_u64(nominal_field_rate_in_uhz + 1000000 - 1, 1000000); + if ((min_refresh_in_uhz / 1000000) > tmp) nominal_field_rate_in_range = false; // Full range may be larger than current video timing, so cap at nominal -- 1.9.1