Skip to contentSkip to conversation

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

PATCH In review Rex Zhu 3 participants 3 messages Apr 17, 2018 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH v2 1/1 drm/amd/display: fix compiling error on 32-Bit Linux

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

v2: remove temporary variable

---
 drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +1 -1
index 5e12e46..685f03d 100644
@@ -647,7 +647,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
 	 * this should be allowed instead of blocking FreeSync.
 	 */
 	if ((min_refresh_in_uhz / 1000000) >
-			((nominal_field_rate_in_uhz + 1000000 - 1) / 1000000))
+		div_u64(nominal_field_rate_in_uhz + 1000000 - 1, 1000000))
 		nominal_field_rate_in_range = false;
 
 	// Full range may be larger than current video timing, so cap at nominal
Signature · 6 lines
1.9.1

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

A message that is not in the archive (sent off-list or not yet received): 1523958275-16794-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 17.04.2018 um 11:44 schrieb Rex Zhu:

Quoted 14 lines

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

v2: remove temporary variable

---
  drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +0 -0
index 5e12e46..685f03d 100644

drivers/gpu/drm/amd/display/modules/freesync/freesync.c void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync, · line 650

Quoted 5 lines
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +1 -1
@@ -647,7 +647,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
  	 * this should be allowed instead of blocking FreeSync.
  	 */
  	if ((min_refresh_in_uhz / 1000000) >
-			((nominal_field_rate_in_uhz + 1000000 - 1) / 1000000))
+		div_u64(nominal_field_rate_in_uhz + 1000000 - 1, 1000000))

The indentation isn't correct, but that is just a nitpick.

Patch is Acked-by: Christian König <[email protected]>.

Regards,
Christian.

drivers/gpu/drm/amd/display/modules/freesync/freesync.c void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync, · line 653

Quoted 3 lines
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +0 -0
  		nominal_field_rate_in_range = false;
 
  	// Full range may be larger than current video timing, so cap at nominal

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

#3 lore raw
In reply to a message not in the archive
Quoted 5 lines · Rex Zhu

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

v2: remove temporary variable

Thanks for the fix.

I just pushed a change by Anthony that removes that hunk of code completely, so this won't be needed anymore.

Harry

Quoted 10 lines
---
 drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +0 -0
index 5e12e46..685f03d 100644

drivers/gpu/drm/amd/display/modules/freesync/freesync.c void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync, · line 653

Quoted 8 lines
drivers/gpu/drm/amd/display/modules/freesync/freesync.c +1 -1
@@ -647,7 +647,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync,
 	 * this should be allowed instead of blocking FreeSync.
 	 */
 	if ((min_refresh_in_uhz / 1000000) >
-			((nominal_field_rate_in_uhz + 1000000 - 1) / 1000000))
+		div_u64(nominal_field_rate_in_uhz + 1000000 - 1, 1000000))
 		nominal_field_rate_in_range = false;
 
 	// Full range may be larger than current video timing, so cap at nominal

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