aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König2018-02-26 07:11:52 -0600
committerChristian König2018-02-28 06:27:43 -0600
commitff0da7b32369a08c8a2f69cd4dcd046ad7a15bec (patch)
tree6990d7abeaf96d368fffc6df507faceb7493b765 /amdgpu/amdgpu_device.c
parentcd8a80493beea4fbdd0a2e0b68ef0adbdaac1133 (diff)
downloadexternal-libdrm-ff0da7b32369a08c8a2f69cd4dcd046ad7a15bec.tar.gz
external-libdrm-ff0da7b32369a08c8a2f69cd4dcd046ad7a15bec.tar.xz
external-libdrm-ff0da7b32369a08c8a2f69cd4dcd046ad7a15bec.zip
amdgpu: add AMDGPU_VA_RANGE_HIGH
Return high addresses if requested and available. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_device.c')
-rw-r--r--amdgpu/amdgpu_device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index ca0c7987..9ff6ad16 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -268,7 +268,6 @@ int amdgpu_device_initialize(int fd,
268 max = MIN2(dev->dev_info.virtual_address_max, 0x100000000ULL); 268 max = MIN2(dev->dev_info.virtual_address_max, 0x100000000ULL);
269 amdgpu_vamgr_init(&dev->vamgr_32, start, max, 269 amdgpu_vamgr_init(&dev->vamgr_32, start, max,
270 dev->dev_info.virtual_address_alignment); 270 dev->dev_info.virtual_address_alignment);
271 dev->address32_hi = start >> 32;
272 271
273 start = max; 272 start = max;
274 max = MAX2(dev->dev_info.virtual_address_max, 0x100000000ULL); 273 max = MAX2(dev->dev_info.virtual_address_max, 0x100000000ULL);
@@ -323,7 +322,10 @@ int amdgpu_query_sw_info(amdgpu_device_handle dev, enum amdgpu_sw_info info,
323 322
324 switch (info) { 323 switch (info) {
325 case amdgpu_sw_info_address32_hi: 324 case amdgpu_sw_info_address32_hi:
326 *val32 = dev->address32_hi; 325 if (dev->vamgr_high_32.va_max)
326 *val32 = dev->vamgr_high_32.va_max >> 32;
327 else
328 *val32 = dev->vamgr_32.va_max >> 32;
327 return 0; 329 return 0;
328 } 330 }
329 return -EINVAL; 331 return -EINVAL;