[03/26] ac: add radeon_info::is_pro_graphics

Submitted by Marek Olšák on Feb. 13, 2019, 5:15 a.m.

Details

Message ID 20190213051621.6235-4-maraeo@gmail.com
State New
Headers show
Series "RadeonSI: Primitive culling with async compute" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Marek Olšák Feb. 13, 2019, 5:15 a.m.
From: Marek Olšák <marek.olsak@amd.com>

---
 src/amd/common/ac_gpu_info.c | 3 +++
 src/amd/common/ac_gpu_info.h | 1 +
 2 files changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
index 4e3190015e7..6971e4f0a8e 100644
--- a/src/amd/common/ac_gpu_info.c
+++ b/src/amd/common/ac_gpu_info.c
@@ -334,6 +334,9 @@  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"));
 
 	/* 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 8971d51dfd7..2c2389eaaa7 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;