Commit 6f31c1f7 authored by Alex Deucher's avatar Alex Deucher Committed by Greg Kroah-Hartman

drm/radeon: fix vm page table block size calculation

commit 8e66e134 upstream.

The page offset is 12 bits.  For example if we have an
8 GB VM, we'd need 33 bits.  The number of bits needed
for PD + PT is 21 (33 - 12 or log2(8) + 18), not 20
(log2(8) + 17).

Noticed by Alexey during code review.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 831e17a9
...@@ -1130,7 +1130,7 @@ static void radeon_check_arguments(struct radeon_device *rdev) ...@@ -1130,7 +1130,7 @@ static void radeon_check_arguments(struct radeon_device *rdev)
if (radeon_vm_block_size == -1) { if (radeon_vm_block_size == -1) {
/* Total bits covered by PD + PTs */ /* Total bits covered by PD + PTs */
unsigned bits = ilog2(radeon_vm_size) + 17; unsigned bits = ilog2(radeon_vm_size) + 18;
/* Make sure the PD is 4K in size up to 8GB address space. /* Make sure the PD is 4K in size up to 8GB address space.
Above that split equal between PD and PTs */ Above that split equal between PD and PTs */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment