Skip to content

Commit 691cf8c

Browse files
committed
drm/amdgpu: use correct rounding macro for 64-bit
This fixes 32-bit arm build due to lack of 64-bit divides. Fixes: cb1c814 ("drm/ttm: flip the switch for driver allocated resources v2") Link: https://patchwork.freedesktop.org/patch/438442/ Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent 09b020b commit 691cf8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ static int amdgpu_vram_mgr_new(struct ttm_resource_manager *man,
407407
#endif
408408
pages_per_node = max_t(uint32_t, pages_per_node,
409409
tbo->page_alignment);
410-
num_nodes = DIV_ROUND_UP(PFN_UP(mem_bytes), pages_per_node);
410+
num_nodes = DIV_ROUND_UP_ULL(PFN_UP(mem_bytes), pages_per_node);
411411
}
412412

413413
node = kvmalloc(struct_size(node, mm_nodes, num_nodes),

0 commit comments

Comments
 (0)