From: Samuel Pitoiset Date: Tue, 12 Nov 2019 16:17:21 +0000 (+0100) Subject: ac: add radeon_info::has_l2_uncached X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2af7511ed2771d45c595518e746fa2f9031ba77a;p=mesa.git ac: add radeon_info::has_l2_uncached For chips that have uncached device memory (ie. MTYPE_UC). Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index 8b346571e25..23dcb190a3f 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -410,6 +410,9 @@ bool ac_query_gpu_info(int fd, void *dev_p, else info->max_alloc_size = info->gart_size * 0.7; + /* Set which chips have uncached device memory. */ + info->has_l2_uncached = info->chip_class >= GFX9; + /* Set hardware information. */ info->gds_size = gds.gds_total_size; info->gds_gfx_partition_size = gds.gds_gfx_partition_size; diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h index c9e3e90848b..cffa0b7b222 100644 --- a/src/amd/common/ac_gpu_info.h +++ b/src/amd/common/ac_gpu_info.h @@ -91,6 +91,7 @@ struct radeon_info { uint32_t min_alloc_size; uint32_t address32_hi; bool has_dedicated_vram; + bool has_l2_uncached; bool r600_has_virtual_memory; uint32_t num_sdp_interfaces; uint32_t num_tcc_blocks;