<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">I think Harry sent out a similar patch a few days ago.</p>
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Rex Zhu <Rex.Zhu@amd.com><br>
<b>Sent:</b> Tuesday, April 17, 2018 5:37:59 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Zhu, Rex<br>
<b>Subject:</b> [PATCH] drm/amd/display: fix compiling error on 32-Bit Linux</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">ERROR: "__udivdi3" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined!<br>
<br>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
---<br>
 drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 5 +++--<br>
 1 file changed, 3 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c<br>
index 5e12e46..d1f57d0 100644<br>
--- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c<br>
+++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c<br>
@@ -616,6 +616,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,<br>
         unsigned int refresh_range = 0;<br>
         unsigned int min_refresh_in_uhz = 0;<br>
         unsigned int max_refresh_in_uhz = 0;<br>
+       unsigned long long tmp;<br>
 <br>
         if (mod_freesync == NULL)<br>
                 return;<br>
@@ -646,8 +647,8 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,<br>
          * calculated from pixel rate and vertical/horizontal totals, but<br>
          * this should be allowed instead of blocking FreeSync.<br>
          */<br>
-       if ((min_refresh_in_uhz / 1000000) ><br>
-                       ((nominal_field_rate_in_uhz + 1000000 - 1) / 1000000))<br>
+       tmp = div_u64(nominal_field_rate_in_uhz + 1000000 - 1, 1000000);<br>
+       if ((min_refresh_in_uhz / 1000000) > tmp)<br>
                 nominal_field_rate_in_range = false;<br>
 <br>
         // Full range may be larger than current video timing, so cap at nominal<br>
-- <br>
1.9.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>