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"
24 #include "util/u_debug.h"
26 /* r300_chipset: A file all to itself for deducing the various properties of
29 /* Parse a PCI ID and fill an r300_capabilities struct with information. */
30 void r300_parse_chipset(struct r300_capabilities
* caps
)
32 /* Reasonable defaults */
33 caps
->num_vert_fpus
= 4;
34 caps
->has_tcl
= getenv("RADEON_NO_TCL") ? FALSE
: TRUE
;
35 caps
->is_r500
= FALSE
;
36 caps
->high_second_pipe
= FALSE
;
39 /* Note: These are not ordered by PCI ID. I leave that task to GCC,
40 * which will perform the ordering while collating jump tables. Instead,
41 * I've tried to group them according to capabilities and age. */
42 switch (caps
->pci_id
) {
44 caps
->family
= CHIP_FAMILY_R300
;
45 caps
->high_second_pipe
= TRUE
;
55 caps
->family
= CHIP_FAMILY_R300
;
56 caps
->high_second_pipe
= TRUE
;
72 caps
->family
= CHIP_FAMILY_RV350
;
73 caps
->high_second_pipe
= TRUE
;
83 caps
->family
= CHIP_FAMILY_R350
;
84 caps
->high_second_pipe
= TRUE
;
88 caps
->family
= CHIP_FAMILY_R360
;
89 caps
->high_second_pipe
= TRUE
;
100 caps
->family
= CHIP_FAMILY_RV370
;
101 caps
->high_second_pipe
= TRUE
;
109 caps
->family
= CHIP_FAMILY_RV380
;
110 caps
->high_second_pipe
= TRUE
;
123 caps
->family
= CHIP_FAMILY_R420
;
124 caps
->num_vert_fpus
= 6;
136 caps
->family
= CHIP_FAMILY_R423
;
137 caps
->num_vert_fpus
= 6;
147 caps
->family
= CHIP_FAMILY_R430
;
148 caps
->num_vert_fpus
= 6;
157 caps
->family
= CHIP_FAMILY_R480
;
158 caps
->num_vert_fpus
= 6;
166 caps
->family
= CHIP_FAMILY_R481
;
167 caps
->num_vert_fpus
= 6;
182 caps
->family
= CHIP_FAMILY_RV410
;
183 caps
->num_vert_fpus
= 6;
188 caps
->family
= CHIP_FAMILY_RS480
;
189 caps
->has_tcl
= FALSE
;
194 caps
->family
= CHIP_FAMILY_RS482
;
195 caps
->has_tcl
= FALSE
;
200 caps
->family
= CHIP_FAMILY_RS400
;
201 caps
->has_tcl
= FALSE
;
206 caps
->family
= CHIP_FAMILY_RC410
;
207 caps
->has_tcl
= FALSE
;
212 caps
->family
= CHIP_FAMILY_RS690
;
213 caps
->has_tcl
= FALSE
;
219 caps
->family
= CHIP_FAMILY_RS600
;
220 caps
->has_tcl
= FALSE
;
227 caps
->family
= CHIP_FAMILY_RS740
;
228 caps
->has_tcl
= FALSE
;
245 caps
->family
= CHIP_FAMILY_R520
;
246 caps
->num_vert_fpus
= 8;
247 caps
->is_r500
= TRUE
;
288 caps
->family
= CHIP_FAMILY_RV515
;
289 caps
->num_vert_fpus
= 2;
290 caps
->is_r500
= TRUE
;
309 caps
->family
= CHIP_FAMILY_RV530
;
310 caps
->num_vert_fpus
= 5;
311 caps
->is_r500
= TRUE
;
329 caps
->family
= CHIP_FAMILY_R580
;
330 caps
->num_vert_fpus
= 8;
331 caps
->is_r500
= TRUE
;
335 caps
->family
= CHIP_FAMILY_RV570
;
336 caps
->num_vert_fpus
= 5;
337 caps
->is_r500
= TRUE
;
351 caps
->family
= CHIP_FAMILY_RV560
;
352 caps
->num_vert_fpus
= 5;
353 caps
->is_r500
= TRUE
;
357 debug_printf("r300: Warning: Unknown chipset 0x%x\n",