Re: [PATCH v1] drm/amdgpu: Try modify this line into a well-understood code

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

 



Am 02.04.21 um 04:55 schrieb ZhiJie.Zhang:
Signed-off-by: ZhiJie.Zhang <zhangzhijie@xxxxxxxxxxx>

Good idea. Reviewed-by: Christian König <christian.koenig@xxxxxxx>

---
  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)

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux