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
;
39 caps
->is_r400
= FALSE
;
40 caps
->is_r500
= FALSE
;
41 caps
->high_second_pipe
= FALSE
;
43 /* Note: These are not ordered by PCI ID. I leave that task to GCC,
44 * which will perform the ordering while collating jump tables. Instead,
45 * I've tried to group them according to capabilities and age. */
46 switch (caps
->pci_id
) {
48 caps
->family
= CHIP_FAMILY_R300
;
49 caps
->high_second_pipe
= TRUE
;
50 caps
->num_vert_fpus
= 4;
60 caps
->family
= CHIP_FAMILY_R300
;
61 caps
->high_second_pipe
= TRUE
;
62 caps
->num_vert_fpus
= 4;
78 caps
->family
= CHIP_FAMILY_RV350
;
79 caps
->high_second_pipe
= TRUE
;
89 caps
->family
= CHIP_FAMILY_R350
;
90 caps
->high_second_pipe
= TRUE
;
91 caps
->num_vert_fpus
= 4;
95 caps
->family
= CHIP_FAMILY_R360
;
96 caps
->high_second_pipe
= TRUE
;
97 caps
->num_vert_fpus
= 4;
108 caps
->family
= CHIP_FAMILY_RV370
;
109 caps
->high_second_pipe
= TRUE
;
118 caps
->family
= CHIP_FAMILY_RV380
;
119 caps
->high_second_pipe
= TRUE
;
132 caps
->family
= CHIP_FAMILY_R420
;
133 caps
->num_vert_fpus
= 6;
134 caps
->is_r400
= TRUE
;
146 caps
->family
= CHIP_FAMILY_R423
;
147 caps
->num_vert_fpus
= 6;
148 caps
->is_r400
= TRUE
;
158 caps
->family
= CHIP_FAMILY_R430
;
159 caps
->num_vert_fpus
= 6;
160 caps
->is_r400
= TRUE
;
169 caps
->family
= CHIP_FAMILY_R480
;
170 caps
->num_vert_fpus
= 6;
171 caps
->is_r400
= TRUE
;
179 caps
->family
= CHIP_FAMILY_R481
;
180 caps
->num_vert_fpus
= 6;
181 caps
->is_r400
= TRUE
;
196 caps
->family
= CHIP_FAMILY_RV410
;
197 caps
->num_vert_fpus
= 6;
198 caps
->is_r400
= TRUE
;
203 caps
->family
= CHIP_FAMILY_RS480
;
204 caps
->has_tcl
= FALSE
;
209 caps
->family
= CHIP_FAMILY_RS482
;
210 caps
->has_tcl
= FALSE
;
215 caps
->family
= CHIP_FAMILY_RS400
;
216 caps
->has_tcl
= FALSE
;
221 caps
->family
= CHIP_FAMILY_RC410
;
222 caps
->has_tcl
= FALSE
;
227 caps
->family
= CHIP_FAMILY_RS690
;
228 caps
->has_tcl
= FALSE
;
229 caps
->is_r400
= TRUE
;
235 caps
->family
= CHIP_FAMILY_RS600
;
236 caps
->has_tcl
= FALSE
;
237 caps
->is_r400
= TRUE
;
244 caps
->family
= CHIP_FAMILY_RS740
;
245 caps
->has_tcl
= FALSE
;
246 caps
->is_r400
= TRUE
;
263 caps
->family
= CHIP_FAMILY_R520
;
264 caps
->num_vert_fpus
= 8;
265 caps
->is_r500
= TRUE
;
306 caps
->family
= CHIP_FAMILY_RV515
;
307 caps
->num_vert_fpus
= 2;
308 caps
->is_r500
= TRUE
;
327 caps
->family
= CHIP_FAMILY_RV530
;
328 caps
->num_vert_fpus
= 5;
329 caps
->is_r500
= TRUE
;
347 caps
->family
= CHIP_FAMILY_R580
;
348 caps
->num_vert_fpus
= 8;
349 caps
->is_r500
= TRUE
;
353 caps
->family
= CHIP_FAMILY_RV570
;
354 caps
->num_vert_fpus
= 8;
355 caps
->is_r500
= TRUE
;
369 caps
->family
= CHIP_FAMILY_RV560
;
370 caps
->num_vert_fpus
= 8;
371 caps
->is_r500
= TRUE
;
375 fprintf(stderr
, "r300: Warning: Unknown chipset 0x%x\n",
379 caps
->is_rv350
= caps
->family
>= CHIP_FAMILY_RV350
;