ac: add radeon_info::has_l2_uncached
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 12 Nov 2019 16:17:21 +0000 (17:17 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Mon, 18 Nov 2019 08:20:19 +0000 (08:20 +0000)
For chips that have uncached device memory (ie. MTYPE_UC).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_gpu_info.c
src/amd/common/ac_gpu_info.h

index 8b346571e254d1d939442d8ba3fe1603e3682076..23dcb190a3fd4dc4048aca70e981666ae4700f20 100644 (file)
@@ -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;
index c9e3e90848bd4c964b484bf773c5847e521d93b1..cffa0b7b22212e8fbc33aa9d1e3ef5e8eb5f9908 100644 (file)
@@ -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;