summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-02-02 18:22:15 +0100
committerMarek Olšák <[email protected]>2018-02-17 04:51:58 +0100
commit0977b7f7b3b6356500889f5a15348e0a3180e683 (patch)
treeb6e1ac0e6cdb6cbc636486cb570c15167452ce32 /src
parent16be55da94ea5e68edc1da8b354402d85306ab20 (diff)
ac: query high bits of 32-bit address space
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_gpu_info.c7
-rw-r--r--src/amd/common/ac_gpu_info.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
index 6d9dcb5c56d..b5b059e1202 100644
--- a/src/amd/common/ac_gpu_info.c
+++ b/src/amd/common/ac_gpu_info.c
@@ -226,6 +226,12 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
return false;
}
+ r = amdgpu_query_sw_info(dev, amdgpu_sw_info_address32_hi, &info->address32_hi);
+ if (r) {
+ fprintf(stderr, "amdgpu: amdgpu_query_sw_info(address32_hi) failed.\n");
+ return false;
+ }
+
/* Set chip identification. */
info->pci_id = amdinfo->asic_id; /* TODO: is this correct? */
info->vce_harvest_config = amdinfo->vce_harvest_config;
@@ -371,6 +377,7 @@ void ac_print_gpu_info(struct radeon_info *info)
printf("max_alloc_size = %i MB\n",
(int)DIV_ROUND_UP(info->max_alloc_size, 1024*1024));
printf("min_alloc_size = %u\n", info->min_alloc_size);
+ printf("address32_hi = %u\n", info->address32_hi);
printf("has_dedicated_vram = %u\n", info->has_dedicated_vram);
printf("has_virtual_memory = %i\n", info->has_virtual_memory);
printf("gfx_ib_pad_with_type2 = %i\n", info->gfx_ib_pad_with_type2);
diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h
index cca3e98d366..ae42aff6017 100644
--- a/src/amd/common/ac_gpu_info.h
+++ b/src/amd/common/ac_gpu_info.h
@@ -57,6 +57,7 @@ struct radeon_info {
uint64_t vram_vis_size;
uint64_t max_alloc_size;
uint32_t min_alloc_size;
+ uint32_t address32_hi;
bool has_dedicated_vram;
bool has_virtual_memory;
bool gfx_ib_pad_with_type2;