[PATCH] drm/amd/display: fix compiling error on 32-Bit Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

________________________________
From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Rex Zhu <Rex.Zhu at amd.com>
Sent: Tuesday, April 17, 2018 5:37:59 AM
To: amd-gfx at lists.freedesktop.org
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 <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

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180417/480eab33/attachment.html>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux