2 * Copyright 2008 Corbin Simpson <MostAwesomeDude@gmail.com>
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * on the rights to use, copy, modify, merge, publish, distribute, sub
8 * license, and/or sell copies of the Software, and to permit persons to whom
9 * the Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
19 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21 * USE OR OTHER DEALINGS IN THE SOFTWARE. */
23 #include "r300_chipset.h"
25 #include "util/u_debug.h"
29 /* r300_chipset: A file all to itself for deducing the various properties of
32 /* Parse a PCI ID and fill an r300_capabilities struct with information. */
33 void r300_parse_chipset(struct r300_capabilities
* caps
)
35 /* Reasonable defaults */
36 caps
->num_vert_fpus
= 2;
37 caps
->num_tex_units
= 16;
38 caps
->has_tcl
= debug_get_bool_option("RADEON_NO_TCL", FALSE
) ? FALSE
: TRUE
;
40 caps
->is_r400
= FALSE
;
41 caps
->is_r500
= FALSE
;
42 caps
->high_second_pipe
= FALSE
;
44 /* Note: These are not ordered by PCI ID. I leave that task to GCC,
45 * which will perform the ordering while collating jump tables. Instead,
46 * I've tried to group them according to capabilities and age. */
47 switch (caps
->pci_id
) {
49 caps
->family
= CHIP_FAMILY_R300
;
50 caps
->high_second_pipe
= TRUE
;
51 caps
->num_vert_fpus
= 4;
61 caps
->family
= CHIP_FAMILY_R300
;
62 caps
->high_second_pipe
= TRUE
;
63 caps
->num_vert_fpus
= 4;
79 caps
->family
= CHIP_FAMILY_RV350
;
80 caps
->has_hiz
= FALSE
;
81 caps
->high_second_pipe
= TRUE
;
91 caps
->family
= CHIP_FAMILY_R350
;
92 caps
->high_second_pipe
= TRUE
;
93 caps
->num_vert_fpus
= 4;
97 caps
->family
= CHIP_FAMILY_R360
;
98 caps
->high_second_pipe
= TRUE
;
99 caps
->num_vert_fpus
= 4;
110 caps
->family
= CHIP_FAMILY_RV370
;
111 caps
->has_hiz
= FALSE
;
112 caps
->high_second_pipe
= TRUE
;
121 caps
->family
= CHIP_FAMILY_RV380
;
122 caps
->high_second_pipe
= TRUE
;
135 caps
->family
= CHIP_FAMILY_R420
;
136 caps
->num_vert_fpus
= 6;
137 caps
->is_r400
= TRUE
;
149 caps
->family
= CHIP_FAMILY_R423
;
150 caps
->num_vert_fpus
= 6;
151 caps
->is_r400
= TRUE
;
161 caps
->family
= CHIP_FAMILY_R430
;
162 caps
->num_vert_fpus
= 6;
163 caps
->is_r400
= TRUE
;
172 caps
->family
= CHIP_FAMILY_R480
;
173 caps
->num_vert_fpus
= 6;
174 caps
->is_r400
= TRUE
;
182 caps
->family
= CHIP_FAMILY_R481
;
183 caps
->num_vert_fpus
= 6;
184 caps
->is_r400
= TRUE
;
199 caps
->family
= CHIP_FAMILY_RV410
;
200 caps
->num_vert_fpus
= 6;
201 caps
->is_r400
= TRUE
;
206 caps
->family
= CHIP_FAMILY_RS480
;
207 caps
->has_hiz
= FALSE
;
208 caps
->has_tcl
= FALSE
;
213 caps
->family
= CHIP_FAMILY_RS482
;
214 caps
->has_hiz
= FALSE
;
215 caps
->has_tcl
= FALSE
;
220 caps
->family
= CHIP_FAMILY_RS400
;
221 caps
->has_hiz
= FALSE
;
222 caps
->has_tcl
= FALSE
;
227 caps
->family
= CHIP_FAMILY_RC410
;
228 caps
->has_hiz
= FALSE
;
229 caps
->has_tcl
= FALSE
;
234 caps
->family
= CHIP_FAMILY_RS690
;
235 caps
->has_tcl
= FALSE
;
236 caps
->is_r400
= TRUE
;
242 caps
->family
= CHIP_FAMILY_RS600
;
243 caps
->has_tcl
= FALSE
;
244 caps
->is_r400
= TRUE
;
251 caps
->family
= CHIP_FAMILY_RS740
;
252 caps
->has_tcl
= FALSE
;
253 caps
->is_r400
= TRUE
;
270 caps
->family
= CHIP_FAMILY_R520
;
271 caps
->num_vert_fpus
= 8;
272 caps
->is_r500
= TRUE
;
313 caps
->family
= CHIP_FAMILY_RV515
;
314 caps
->num_vert_fpus
= 2;
315 caps
->is_r500
= TRUE
;
334 caps
->family
= CHIP_FAMILY_RV530
;
335 caps
->num_vert_fpus
= 5;
336 caps
->is_r500
= TRUE
;
354 caps
->family
= CHIP_FAMILY_R580
;
355 caps
->num_vert_fpus
= 8;
356 caps
->is_r500
= TRUE
;
360 caps
->family
= CHIP_FAMILY_RV570
;
361 caps
->num_vert_fpus
= 8;
362 caps
->is_r500
= TRUE
;
376 caps
->family
= CHIP_FAMILY_RV560
;
377 caps
->num_vert_fpus
= 8;
378 caps
->is_r500
= TRUE
;
382 fprintf(stderr
, "r300: Warning: Unknown chipset 0x%x\n",
386 caps
->is_rv350
= caps
->family
>= CHIP_FAMILY_RV350
;