]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Adjust the VM size based on system memory size v2
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 21 Aug 2018 21:14:32 +0000 (17:14 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 19:48:25 +0000 (14:48 -0500)
commit1608406f1b1a3d63bfd0b64f169b6a65ff55f6c0
treeab35dab8572bcd94548c28a52ca35e26728913b1
parent0e1048ab278a9aa6669fcddc8a890a837b31971c
drm/amdgpu: Adjust the VM size based on system memory size v2

Set the VM size based on system memory size between the ASIC-specific
limits given by min_vm_size and max_bits. GFXv9 GPUs will keep their
default VM size of 256TB (48 bit). Only older GPUs will adjust VM size
depending on system memory size.

This makes more VM space available for ROCm applications on GFXv8 GPUs
that want to map all available VRAM and system memory in their SVM
address space.

v2:
* Clarify comment
* Round up memory size before >> 30
* Round up automatic vm_size to power of two

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Junwei Zhang <Jerry.Zhang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h