1bf215546Sopenharmony_ci/* 2bf215546Sopenharmony_ci * Copyright © 2017 Advanced Micro Devices, Inc. 3bf215546Sopenharmony_ci * 4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining 5bf215546Sopenharmony_ci * a copy of this software and associated documentation files (the 6bf215546Sopenharmony_ci * "Software"), to deal in the Software without restriction, including 7bf215546Sopenharmony_ci * without limitation the rights to use, copy, modify, merge, publish, 8bf215546Sopenharmony_ci * distribute, sub license, and/or sell copies of the Software, and to 9bf215546Sopenharmony_ci * permit persons to whom the Software is furnished to do so, subject to 10bf215546Sopenharmony_ci * the following conditions: 11bf215546Sopenharmony_ci * 12bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 13bf215546Sopenharmony_ci * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 14bf215546Sopenharmony_ci * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 15bf215546Sopenharmony_ci * NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS, AUTHORS 16bf215546Sopenharmony_ci * AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17bf215546Sopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 18bf215546Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 19bf215546Sopenharmony_ci * USE OR OTHER DEALINGS IN THE SOFTWARE. 20bf215546Sopenharmony_ci * 21bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the 22bf215546Sopenharmony_ci * next paragraph) shall be included in all copies or substantial portions 23bf215546Sopenharmony_ci * of the Software. 24bf215546Sopenharmony_ci */ 25bf215546Sopenharmony_ci 26bf215546Sopenharmony_ci#include "amd_family.h" 27bf215546Sopenharmony_ci 28bf215546Sopenharmony_ci#include "util/macros.h" 29bf215546Sopenharmony_ci 30bf215546Sopenharmony_ciconst char *ac_get_family_name(enum radeon_family family) 31bf215546Sopenharmony_ci{ 32bf215546Sopenharmony_ci switch (family) { 33bf215546Sopenharmony_ci case CHIP_TAHITI: 34bf215546Sopenharmony_ci return "TAHITI"; 35bf215546Sopenharmony_ci case CHIP_PITCAIRN: 36bf215546Sopenharmony_ci return "PITCAIRN"; 37bf215546Sopenharmony_ci case CHIP_VERDE: 38bf215546Sopenharmony_ci return "VERDE"; 39bf215546Sopenharmony_ci case CHIP_OLAND: 40bf215546Sopenharmony_ci return "OLAND"; 41bf215546Sopenharmony_ci case CHIP_HAINAN: 42bf215546Sopenharmony_ci return "HAINAN"; 43bf215546Sopenharmony_ci case CHIP_BONAIRE: 44bf215546Sopenharmony_ci return "BONAIRE"; 45bf215546Sopenharmony_ci case CHIP_KABINI: 46bf215546Sopenharmony_ci return "KABINI"; 47bf215546Sopenharmony_ci case CHIP_KAVERI: 48bf215546Sopenharmony_ci return "KAVERI"; 49bf215546Sopenharmony_ci case CHIP_HAWAII: 50bf215546Sopenharmony_ci return "HAWAII"; 51bf215546Sopenharmony_ci case CHIP_TONGA: 52bf215546Sopenharmony_ci return "TONGA"; 53bf215546Sopenharmony_ci case CHIP_ICELAND: 54bf215546Sopenharmony_ci return "ICELAND"; 55bf215546Sopenharmony_ci case CHIP_CARRIZO: 56bf215546Sopenharmony_ci return "CARRIZO"; 57bf215546Sopenharmony_ci case CHIP_FIJI: 58bf215546Sopenharmony_ci return "FIJI"; 59bf215546Sopenharmony_ci case CHIP_STONEY: 60bf215546Sopenharmony_ci return "STONEY"; 61bf215546Sopenharmony_ci case CHIP_POLARIS10: 62bf215546Sopenharmony_ci return "POLARIS10"; 63bf215546Sopenharmony_ci case CHIP_POLARIS11: 64bf215546Sopenharmony_ci return "POLARIS11"; 65bf215546Sopenharmony_ci case CHIP_POLARIS12: 66bf215546Sopenharmony_ci return "POLARIS12"; 67bf215546Sopenharmony_ci case CHIP_VEGAM: 68bf215546Sopenharmony_ci return "VEGAM"; 69bf215546Sopenharmony_ci case CHIP_VEGA10: 70bf215546Sopenharmony_ci return "VEGA10"; 71bf215546Sopenharmony_ci case CHIP_RAVEN: 72bf215546Sopenharmony_ci return "RAVEN"; 73bf215546Sopenharmony_ci case CHIP_VEGA12: 74bf215546Sopenharmony_ci return "VEGA12"; 75bf215546Sopenharmony_ci case CHIP_VEGA20: 76bf215546Sopenharmony_ci return "VEGA20"; 77bf215546Sopenharmony_ci case CHIP_RAVEN2: 78bf215546Sopenharmony_ci return "RAVEN2"; 79bf215546Sopenharmony_ci case CHIP_RENOIR: 80bf215546Sopenharmony_ci return "RENOIR"; 81bf215546Sopenharmony_ci case CHIP_ARCTURUS: 82bf215546Sopenharmony_ci return "ARCTURUS"; 83bf215546Sopenharmony_ci case CHIP_ALDEBARAN: 84bf215546Sopenharmony_ci return "ALDEBARAN"; 85bf215546Sopenharmony_ci case CHIP_NAVI10: 86bf215546Sopenharmony_ci return "NAVI10"; 87bf215546Sopenharmony_ci case CHIP_NAVI12: 88bf215546Sopenharmony_ci return "NAVI12"; 89bf215546Sopenharmony_ci case CHIP_NAVI14: 90bf215546Sopenharmony_ci return "NAVI14"; 91bf215546Sopenharmony_ci case CHIP_NAVI21: 92bf215546Sopenharmony_ci return "NAVI21"; 93bf215546Sopenharmony_ci case CHIP_NAVI22: 94bf215546Sopenharmony_ci return "NAVI22"; 95bf215546Sopenharmony_ci case CHIP_NAVI23: 96bf215546Sopenharmony_ci return "NAVI23"; 97bf215546Sopenharmony_ci case CHIP_VANGOGH: 98bf215546Sopenharmony_ci return "VANGOGH"; 99bf215546Sopenharmony_ci case CHIP_NAVI24: 100bf215546Sopenharmony_ci return "NAVI24"; 101bf215546Sopenharmony_ci case CHIP_REMBRANDT: 102bf215546Sopenharmony_ci return "REMBRANDT"; 103bf215546Sopenharmony_ci case CHIP_GFX1036: 104bf215546Sopenharmony_ci return "GFX1036"; 105bf215546Sopenharmony_ci case CHIP_GFX1100: 106bf215546Sopenharmony_ci return "GFX1100"; 107bf215546Sopenharmony_ci case CHIP_GFX1101: 108bf215546Sopenharmony_ci return "GFX1101"; 109bf215546Sopenharmony_ci case CHIP_GFX1102: 110bf215546Sopenharmony_ci return "GFX1102"; 111bf215546Sopenharmony_ci case CHIP_GFX1103: 112bf215546Sopenharmony_ci return "GFX1103"; 113bf215546Sopenharmony_ci default: 114bf215546Sopenharmony_ci unreachable("Unknown GPU family"); 115bf215546Sopenharmony_ci } 116bf215546Sopenharmony_ci} 117