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"
27 /* r300_chipset: A file all to itself for deducing the various properties of
30 /* Parse a PCI ID and fill an r300_capabilities struct with information. */
31 void r300_parse_chipset(struct r300_capabilities
* caps
)
33 /* Reasonable defaults */
34 caps
->num_vert_fpus
= 4;
35 caps
->has_tcl
= debug_get_bool_option("RADEON_NO_TCL", FALSE
) ? FALSE
: TRUE
;
36 caps
->is_r400
= FALSE
;
37 caps
->is_r500
= FALSE
;
38 caps
->high_second_pipe
= FALSE
;
41 /* Note: These are not ordered by PCI ID. I leave that task to GCC,
42 * which will perform the ordering while collating jump tables. Instead,
43 * I've tried to group them according to capabilities and age. */
44 switch (caps
->pci_id
) {
46 caps
->family
= CHIP_FAMILY_R300
;
47 caps
->high_second_pipe
= TRUE
;
57 caps
->family
= CHIP_FAMILY_R300
;
58 caps
->high_second_pipe
= TRUE
;
74 caps
->family
= CHIP_FAMILY_RV350
;
75 caps
->high_second_pipe
= TRUE
;
85 caps
->family
= CHIP_FAMILY_R350
;
86 caps
->high_second_pipe
= TRUE
;
90 caps
->family
= CHIP_FAMILY_R360
;
91 caps
->high_second_pipe
= TRUE
;
102 caps
->family
= CHIP_FAMILY_RV370
;
103 caps
->high_second_pipe
= TRUE
;
111 caps
->family
= CHIP_FAMILY_RV380
;
112 caps
->high_second_pipe
= TRUE
;
125 caps
->family
= CHIP_FAMILY_R420
;
126 caps
->num_vert_fpus
= 6;
127 caps
->is_r400
= TRUE
;
139 caps
->family
= CHIP_FAMILY_R423
;
140 caps
->num_vert_fpus
= 6;
141 caps
->is_r400
= TRUE
;
151 caps
->family
= CHIP_FAMILY_R430
;
152 caps
->num_vert_fpus
= 6;
153 caps
->is_r400
= TRUE
;
162 caps
->family
= CHIP_FAMILY_R480
;
163 caps
->num_vert_fpus
= 6;
164 caps
->is_r400
= TRUE
;
172 caps
->family
= CHIP_FAMILY_R481
;
173 caps
->num_vert_fpus
= 6;
174 caps
->is_r400
= TRUE
;
189 caps
->family
= CHIP_FAMILY_RV410
;
190 caps
->num_vert_fpus
= 6;
191 caps
->is_r400
= TRUE
;
196 caps
->family
= CHIP_FAMILY_RS480
;
197 caps
->has_tcl
= FALSE
;
202 caps
->family
= CHIP_FAMILY_RS482
;
203 caps
->has_tcl
= FALSE
;
208 caps
->family
= CHIP_FAMILY_RS400
;
209 caps
->has_tcl
= FALSE
;
214 caps
->family
= CHIP_FAMILY_RC410
;
215 caps
->has_tcl
= FALSE
;
220 caps
->family
= CHIP_FAMILY_RS690
;
221 caps
->has_tcl
= FALSE
;
222 caps
->is_r400
= TRUE
;
228 caps
->family
= CHIP_FAMILY_RS600
;
229 caps
->has_tcl
= FALSE
;
230 caps
->is_r400
= TRUE
;
237 caps
->family
= CHIP_FAMILY_RS740
;
238 caps
->has_tcl
= FALSE
;
239 caps
->is_r400
= TRUE
;
256 caps
->family
= CHIP_FAMILY_R520
;
257 caps
->num_vert_fpus
= 8;
258 caps
->is_r500
= TRUE
;
299 caps
->family
= CHIP_FAMILY_RV515
;
300 caps
->num_vert_fpus
= 2;
301 caps
->is_r500
= TRUE
;
320 caps
->family
= CHIP_FAMILY_RV530
;
321 caps
->num_vert_fpus
= 5;
322 caps
->is_r500
= TRUE
;
340 caps
->family
= CHIP_FAMILY_R580
;
341 caps
->num_vert_fpus
= 8;
342 caps
->is_r500
= TRUE
;
346 caps
->family
= CHIP_FAMILY_RV570
;
347 caps
->num_vert_fpus
= 5;
348 caps
->is_r500
= TRUE
;
362 caps
->family
= CHIP_FAMILY_RV560
;
363 caps
->num_vert_fpus
= 5;
364 caps
->is_r500
= TRUE
;
368 debug_printf("r300: Warning: Unknown chipset 0x%x\n",