From bfb92875992599d9c5ca5ecf39fce36a1719272d Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 12 Feb 2019 12:19:33 -0500 Subject: ac: add radeon_info::is_pro_graphics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tested-by: Dieter Nützel Acked-by: Nicolai Hähnle --- src/amd/common/ac_gpu_info.c | 4 ++++ src/amd/common/ac_gpu_info.h | 1 + 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index fa052c8b861..e46424dd885 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -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 = diff --git a/src/amd/common/ac_gpu_info.h b/src/amd/common/ac_gpu_info.h index 4e3afc2b4dc..946c2df82d0 100644 --- a/src/amd/common/ac_gpu_info.h +++ b/src/amd/common/ac_gpu_info.h @@ -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; -- cgit v1.2.3