ac: add radeon_info::all_vram_visible for Smart Access Memory

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7951>
This commit is contained in:
Marek Olšák
2020-12-06 13:59:53 -05:00
parent 8bd25d3835
commit d3d6d38145
2 changed files with 5 additions and 0 deletions

View File

@@ -503,6 +503,9 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
info->vram_vis_size = vram_vis.heap_size;
}
/* Add some margin of error, though this shouldn't be needed in theory. */
info->all_vram_visible = info->vram_size * 0.9 < info->vram_vis_size;
/* Set chip identification. */
info->pci_id = amdinfo->asic_id; /* TODO: is this correct? */
info->pci_rev_id = amdinfo->pci_rev_id;
@@ -1044,6 +1047,7 @@ void ac_print_gpu_info(struct radeon_info *info, FILE *f)
fprintf(f, " min_alloc_size = %u\n", info->min_alloc_size);
fprintf(f, " address32_hi = %u\n", info->address32_hi);
fprintf(f, " has_dedicated_vram = %u\n", info->has_dedicated_vram);
fprintf(f, " all_vram_visible = %u\n", info->all_vram_visible);
fprintf(f, " num_sdp_interfaces = %u\n", info->num_sdp_interfaces);
fprintf(f, " num_tcc_blocks = %i\n", info->num_tcc_blocks);
fprintf(f, " tcc_cache_line_size = %u\n", info->tcc_cache_line_size);

View File

@@ -98,6 +98,7 @@ struct radeon_info {
uint32_t min_alloc_size;
uint32_t address32_hi;
bool has_dedicated_vram;
bool all_vram_visible;
bool has_l2_uncached;
bool r600_has_virtual_memory;
uint32_t num_sdp_interfaces;