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