Mesa (master): ac: fix detection of Pro graphics

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 18 06:41:16 UTC 2020


Module: Mesa
Branch: master
Commit: b635dff25620b948080d31211ca487a71203af4d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b635dff25620b948080d31211ca487a71203af4d

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Tue Nov 10 18:43:12 2020 -0500

ac: fix detection of Pro graphics

Fixes: bfb928759 "ac: add radeon_info::is_pro_graphics"

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7542>

---

 src/amd/common/ac_gpu_info.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
index c5812452320..577ddd297e0 100644
--- a/src/amd/common/ac_gpu_info.c
+++ b/src/amd/common/ac_gpu_info.c
@@ -468,9 +468,9 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
    info->family_id = amdinfo->family_id;
    info->chip_external_rev = amdinfo->chip_external_rev;
    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"));
+   info->is_pro_graphics = info->marketing_name && (!strstr(info->marketing_name, "Pro") ||
+                                                    !strstr(info->marketing_name, "PRO") ||
+                                                    !strstr(info->marketing_name, "Frontier"));
 
    /* Set which chips have dedicated VRAM. */
    info->has_dedicated_vram = !(amdinfo->ids_flags & AMDGPU_IDS_FLAGS_FUSION);



More information about the mesa-commit mailing list