aboutsummaryrefslogtreecommitdiffstats
path: root/amdgpu
diff options
context:
space:
mode:
authorChristian König2017-11-07 08:31:45 -0600
committerChristian König2017-11-08 09:12:56 -0600
commit6c0ea4b0c5452bfc1e67b74ce723696ef3c80b25 (patch)
tree02a57346b76fc62aed571108fdcbc9ef570e3599 /amdgpu
parent944f6665de36b6a6c36263f23b7b9d1730e544fa (diff)
downloadexternal-libdrm-6c0ea4b0c5452bfc1e67b74ce723696ef3c80b25.tar.gz
external-libdrm-6c0ea4b0c5452bfc1e67b74ce723696ef3c80b25.tar.xz
external-libdrm-6c0ea4b0c5452bfc1e67b74ce723696ef3c80b25.zip
amdgpu: use the high VA range if possible
This frees up the low range for HMM. Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'amdgpu')
-rw-r--r--amdgpu/amdgpu_device.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index fa4ab0e7..e04424d3 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -275,8 +275,13 @@ int amdgpu_device_initialize(int fd,
275 amdgpu_vamgr_init(&dev->vamgr_32, start, max, 275 amdgpu_vamgr_init(&dev->vamgr_32, start, max,
276 dev->dev_info.virtual_address_alignment); 276 dev->dev_info.virtual_address_alignment);
277 277
278 start = MAX2(dev->dev_info.virtual_address_offset, 0x100000000ULL); 278 if (dev->dev_info.high_va_offset && dev->dev_info.high_va_max) {
279 max = MAX2(dev->dev_info.virtual_address_max, 0x100000000ULL); 279 start = dev->dev_info.high_va_offset;
280 max = dev->dev_info.high_va_max;
281 } else {
282 start = MAX2(dev->dev_info.virtual_address_offset, 0x100000000ULL);
283 max = MAX2(dev->dev_info.virtual_address_max, 0x100000000ULL);
284 }
280 amdgpu_vamgr_init(&dev->vamgr, start, max, 285 amdgpu_vamgr_init(&dev->vamgr, start, max,
281 dev->dev_info.virtual_address_alignment); 286 dev->dev_info.virtual_address_alignment);
282 287