mirror of https://gitee.com/openkylin/linux.git
drm/amdgpu: csa_vaddr should not larger than AMDGPU_GMC_HOLE_START
After removing unnecessary VM size calculations, vm_manager.max_pfn would reach 0x10,0000,0000 max_pfn << AMDGPU_GPU_PAGE_SHIFT exceeding AMDGPU_GMC_HOLE_START would cause GPU reset. Signed-off-by: wentalou <Wentao.Lou@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
a97c084aad
commit
06ea4c3499
|
@ -26,7 +26,8 @@
|
|||
|
||||
uint64_t amdgpu_csa_vaddr(struct amdgpu_device *adev)
|
||||
{
|
||||
uint64_t addr = adev->vm_manager.max_pfn << AMDGPU_GPU_PAGE_SHIFT;
|
||||
uint64_t addr = min(adev->vm_manager.max_pfn << AMDGPU_GPU_PAGE_SHIFT,
|
||||
AMDGPU_GMC_HOLE_START);
|
||||
|
||||
addr -= AMDGPU_VA_RESERVED_SIZE;
|
||||
addr = amdgpu_gmc_sign_extend(addr);
|
||||
|
|
Loading…
Reference in New Issue