I think Harry sent out a similar patch a few days ago.

Reviewed-by: Alex Deucher <[email protected]>

________________________________
From: amd-gfx <[email protected]> on behalf of Rex Zhu 
<[email protected]>
Sent: Tuesday, April 17, 2018 5:37:59 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amd/display: fix compiling error on 32-Bit Linux

ERROR: "__udivdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!

Signed-off-by: Rex Zhu <[email protected]>
---
 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

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to