[PATCH libdrm 3/3] amdgpu: use the high VA range if possible
Christian König
ckoenig.leichtzumerken at gmail.com
Thu Nov 16 10:24:59 UTC 2017
Retire the 32bit range and the low range on Vega10. AFAIK THe 32bit
range was never used by any open source component and this frees up
everything below 0xffff800000000000 for HMM.
Signed-off-by: Christian König <christian.koenig at amd.com>
---
amdgpu/amdgpu_device.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index fa4ab0e7..6a7af011 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -270,13 +270,20 @@ int amdgpu_device_initialize(int fd,
goto cleanup;
}
- start = dev->dev_info.virtual_address_offset;
- max = MIN2(dev->dev_info.virtual_address_max, 0x100000000ULL);
- amdgpu_vamgr_init(&dev->vamgr_32, start, max,
- dev->dev_info.virtual_address_alignment);
-
- start = MAX2(dev->dev_info.virtual_address_offset, 0x100000000ULL);
- max = MAX2(dev->dev_info.virtual_address_max, 0x100000000ULL);
+ if (dev->dev_info.high_va_offset && dev->dev_info.high_va_max) {
+ amdgpu_vamgr_init(&dev->vamgr_32, 0, 0, 0);
+
+ start = dev->dev_info.high_va_offset;
+ max = dev->dev_info.high_va_max;
+ } else {
+ start = dev->dev_info.virtual_address_offset;
+ max = MIN2(dev->dev_info.virtual_address_max, 0x100000000ULL);
+ amdgpu_vamgr_init(&dev->vamgr_32, start, max,
+ dev->dev_info.virtual_address_alignment);
+
+ start = MAX2(dev->dev_info.virtual_address_offset, 0x100000000ULL);
+ max = MAX2(dev->dev_info.virtual_address_max, 0x100000000ULL);
+ }
amdgpu_vamgr_init(&dev->vamgr, start, max,
dev->dev_info.virtual_address_alignment);
--
2.11.0
More information about the amd-gfx
mailing list