ac: add radeon_info::is_pro_graphics
authorMarek Olšák <marek.olsak@amd.com>
Tue, 12 Feb 2019 17:19:33 +0000 (12:19 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 23 Apr 2019 15:28:56 +0000 (11:28 -0400)
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Acked-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/amd/common/ac_gpu_info.c
src/amd/common/ac_gpu_info.h

index fa052c8b861e57715b07b99a38e953bffc31005d..e46424dd885222fb06cf783e23942583c06b8fee 100644 (file)
@@ -334,6 +334,10 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
        }
 
        info->marketing_name = amdgpu_get_marketing_name(dev);
+       info->is_pro_graphics = info->marketing_name &&
+                               (!strcmp(info->marketing_name, "Pro") ||
+                                !strcmp(info->marketing_name, "PRO") ||
+                                !strcmp(info->marketing_name, "Frontier"));
 
        /* Set which chips have dedicated VRAM. */
        info->has_dedicated_vram =
index 4e3afc2b4dc07b7276556218b4d7972274144ea3..946c2df82d00227aefe21c14cffc7c5e1aa459ae 100644 (file)
@@ -49,6 +49,7 @@ struct radeon_info {
        /* Device info. */
        const char                  *name;
        const char                  *marketing_name;
+       bool                        is_pro_graphics;
        uint32_t                    pci_id;
        enum radeon_family          family;
        enum chip_class             chip_class;