[PATCH v1] drm/amdgpu: Try modify this line into a well-understood code
Christian König
christian.koenig at amd.com
Fri Apr 2 13:42:30 UTC 2021
Am 02.04.21 um 04:55 schrieb ZhiJie.Zhang:
> Signed-off-by: ZhiJie.Zhang <zhangzhijie at loongson.cn>
Good idea. Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index ad91c0c3c423..f79af5fb61db 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2709,7 +2709,7 @@ void amdgpu_vm_adjust_size(struct amdgpu_device *adev, uint32_t min_vm_size,
> min(max(phys_ram_gb * 3, min_vm_size), max_size));
> }
>
> - adev->vm_manager.max_pfn = (uint64_t)vm_size << 18;
> + adev->vm_manager.max_pfn = (uint64_t)vm_size << (30 - AMDGPU_GPU_PAGE_SHIFT);
>
> tmp = roundup_pow_of_two(adev->vm_manager.max_pfn);
> if (amdgpu_vm_block_size != -1)
More information about the amd-gfx
mailing list