aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_device.c28
-rw-r--r--src/amd/vulkan/radv_radeon_winsys.h1
-rw-r--r--src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c28
3 files changed, 27 insertions, 30 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 1484003639e..4ba90c5804c 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -208,6 +208,32 @@ is_extension_enabled(const VkExtensionProperties *extensions,
return false;
}
+static const char *
+get_chip_name(enum radeon_family family)
+{
+ switch (family) {
+ case CHIP_TAHITI: return "AMD RADV TAHITI";
+ case CHIP_PITCAIRN: return "AMD RADV PITCAIRN";
+ case CHIP_VERDE: return "AMD RADV CAPE VERDE";
+ case CHIP_OLAND: return "AMD RADV OLAND";
+ case CHIP_HAINAN: return "AMD RADV HAINAN";
+ case CHIP_BONAIRE: return "AMD RADV BONAIRE";
+ case CHIP_KAVERI: return "AMD RADV KAVERI";
+ case CHIP_KABINI: return "AMD RADV KABINI";
+ case CHIP_HAWAII: return "AMD RADV HAWAII";
+ case CHIP_MULLINS: return "AMD RADV MULLINS";
+ case CHIP_TONGA: return "AMD RADV TONGA";
+ case CHIP_ICELAND: return "AMD RADV ICELAND";
+ case CHIP_CARRIZO: return "AMD RADV CARRIZO";
+ case CHIP_FIJI: return "AMD RADV FIJI";
+ case CHIP_POLARIS10: return "AMD RADV POLARIS10";
+ case CHIP_POLARIS11: return "AMD RADV POLARIS11";
+ case CHIP_POLARIS12: return "AMD RADV POLARIS12";
+ case CHIP_STONEY: return "AMD RADV STONEY";
+ default: return "AMD RADV unknown";
+ }
+}
+
static VkResult
radv_physical_device_init(struct radv_physical_device *device,
struct radv_instance *instance,
@@ -271,7 +297,7 @@ radv_physical_device_init(struct radv_physical_device *device,
goto fail;
fprintf(stderr, "WARNING: radv is not a conformant vulkan implementation, testing use only.\n");
- device->name = device->rad_info.name;
+ device->name = get_chip_name(device->rad_info.family);
radv_get_device_uuid(drm_device, device->device_uuid);
diff --git a/src/amd/vulkan/radv_radeon_winsys.h b/src/amd/vulkan/radv_radeon_winsys.h
index 817371497ed..855a2d712af 100644
--- a/src/amd/vulkan/radv_radeon_winsys.h
+++ b/src/amd/vulkan/radv_radeon_winsys.h
@@ -84,7 +84,6 @@ struct radeon_info {
/* Device info. */
uint32_t pci_id;
enum radeon_family family;
- const char *name;
enum chip_class chip_class;
uint32_t gart_page_size;
uint64_t gart_size;
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
index 629da31538f..d144d032e19 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
@@ -87,33 +87,6 @@ static unsigned radv_cik_get_num_tile_pipes(struct amdgpu_gpu_info *info)
}
}
-static const char *
-get_chip_name(enum radeon_family family)
-{
- switch (family) {
- case CHIP_TAHITI: return "AMD RADV TAHITI";
- case CHIP_PITCAIRN: return "AMD RADV PITCAIRN";
- case CHIP_VERDE: return "AMD RADV CAPE VERDE";
- case CHIP_OLAND: return "AMD RADV OLAND";
- case CHIP_HAINAN: return "AMD RADV HAINAN";
- case CHIP_BONAIRE: return "AMD RADV BONAIRE";
- case CHIP_KAVERI: return "AMD RADV KAVERI";
- case CHIP_KABINI: return "AMD RADV KABINI";
- case CHIP_HAWAII: return "AMD RADV HAWAII";
- case CHIP_MULLINS: return "AMD RADV MULLINS";
- case CHIP_TONGA: return "AMD RADV TONGA";
- case CHIP_ICELAND: return "AMD RADV ICELAND";
- case CHIP_CARRIZO: return "AMD RADV CARRIZO";
- case CHIP_FIJI: return "AMD RADV FIJI";
- case CHIP_POLARIS10: return "AMD RADV POLARIS10";
- case CHIP_POLARIS11: return "AMD RADV POLARIS11";
- case CHIP_POLARIS12: return "AMD RADV POLARIS12";
- case CHIP_STONEY: return "AMD RADV STONEY";
- default: return "AMD RADV unknown";
- }
-}
-
-
static bool
do_winsys_init(struct radv_amdgpu_winsys *ws, int fd)
{
@@ -291,7 +264,6 @@ do_winsys_init(struct radv_amdgpu_winsys *ws, int fd)
assert(util_is_power_of_two(compute.available_rings + 1));
/* Set hardware information. */
- ws->info.name = get_chip_name(ws->info.family);
ws->info.gart_size = gtt.heap_size;
ws->info.vram_size = vram.heap_size;
ws->info.visible_vram_size = visible_vram.heap_size;