ac: query high bits of 32-bit address space
authorMarek Olšák <marek.olsak@amd.com>
Fri, 2 Feb 2018 17:22:15 +0000 (18:22 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 17 Feb 2018 03:51:58 +0000 (04:51 +0100)
configure.ac
meson.build
src/amd/common/ac_gpu_info.c
src/amd/common/ac_gpu_info.h

index 8ed606c769460c1b04e3486513fa0888a1677fa7..994052d5c413092e61d1db08465d848bdc15518b 100644 (file)
@@ -74,7 +74,7 @@ AC_SUBST([OPENCL_VERSION])
 # in the first entry.
 LIBDRM_REQUIRED=2.4.75
 LIBDRM_RADEON_REQUIRED=2.4.71
-LIBDRM_AMDGPU_REQUIRED=2.4.89
+LIBDRM_AMDGPU_REQUIRED=2.4.90
 LIBDRM_INTEL_REQUIRED=2.4.75
 LIBDRM_NVVIEUX_REQUIRED=2.4.66
 LIBDRM_NOUVEAU_REQUIRED=2.4.66
index a3d1b3d670b3985fa7f23c3ab7038fe8be20df11..6fc7ec7fc9626ed8fb28e77bf10ae557800de710 100644 (file)
@@ -980,7 +980,7 @@ dep_libdrm_nouveau = []
 dep_libdrm_etnaviv = []
 dep_libdrm_freedreno = []
 if with_amd_vk or with_gallium_radeonsi
-  dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= 2.4.89')
+  dep_libdrm_amdgpu = dependency('libdrm_amdgpu', version : '>= 2.4.90')
 endif
 if (with_gallium_radeonsi or with_dri_r100 or with_dri_r200 or
     with_gallium_r300 or with_gallium_r600)
index 6d9dcb5c56db322cd0cf071067a4fefc4473b5a2..b5b059e120210c36a14f590e5c8454a8295a4d89 100644 (file)
@@ -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);
index cca3e98d3666f88223e7fb8874f8032eb42ca7f2..ae42aff6017ee7eebb6af8e9042285e34331c839 100644 (file)
@@ -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;