aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2009-09-21 18:50:10 -0400
committerDave Airlie <airlied@redhat.com>2009-09-22 20:21:00 -0400
commitc214271563c00f2721c5111e27b53bf06dabc6e4 (patch)
treea85755e4051a73eb5c0f906f91941ee6619f9a1d /drivers
parentaadd4e17452d3d5c2269cd2b000b7de7cfb6c79e (diff)
drm/radeon: consolidate family flags used in pciids.
having these separate was pointless and introduced a bug when one got updated without the other. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/radeon.h59
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.h65
-rw-r--r--drivers/gpu/drm/radeon/radeon_family.h97
3 files changed, 100 insertions, 121 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 817af8ecff10..d5de53e06cec 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -49,6 +49,7 @@
49#include <linux/list.h> 49#include <linux/list.h>
50#include <linux/kref.h> 50#include <linux/kref.h>
51 51
52#include "radeon_family.h"
52#include "radeon_mode.h" 53#include "radeon_mode.h"
53#include "radeon_reg.h" 54#include "radeon_reg.h"
54 55
@@ -77,64 +78,6 @@ extern int radeon_tv;
77#define RADEONFB_CONN_LIMIT 4 78#define RADEONFB_CONN_LIMIT 4
78#define RADEON_BIOS_NUM_SCRATCH 8 79#define RADEON_BIOS_NUM_SCRATCH 8
79 80
80enum radeon_family {
81 CHIP_R100,
82 CHIP_RV100,
83 CHIP_RS100,
84 CHIP_RV200,
85 CHIP_RS200,
86 CHIP_R200,
87 CHIP_RV250,
88 CHIP_RS300,
89 CHIP_RV280,
90 CHIP_R300,
91 CHIP_R350,
92 CHIP_RV350,
93 CHIP_RV380,
94 CHIP_R420,
95 CHIP_R423,
96 CHIP_RV410,
97 CHIP_RS400,
98 CHIP_RS480,
99 CHIP_RS600,
100 CHIP_RS690,
101 CHIP_RS740,
102 CHIP_RV515,
103 CHIP_R520,
104 CHIP_RV530,
105 CHIP_RV560,
106 CHIP_RV570,
107 CHIP_R580,
108 CHIP_R600,
109 CHIP_RV610,
110 CHIP_RV630,
111 CHIP_RV670,
112 CHIP_RV620,
113 CHIP_RV635,
114 CHIP_RS780,
115 CHIP_RS880,
116 CHIP_RV770,
117 CHIP_RV730,
118 CHIP_RV710,
119 CHIP_RV740,
120 CHIP_LAST,
121};
122
123enum radeon_chip_flags {
124 RADEON_FAMILY_MASK = 0x0000ffffUL,
125 RADEON_FLAGS_MASK = 0xffff0000UL,
126 RADEON_IS_MOBILITY = 0x00010000UL,
127 RADEON_IS_IGP = 0x00020000UL,
128 RADEON_SINGLE_CRTC = 0x00040000UL,
129 RADEON_IS_AGP = 0x00080000UL,
130 RADEON_HAS_HIERZ = 0x00100000UL,
131 RADEON_IS_PCIE = 0x00200000UL,
132 RADEON_NEW_MEMMAP = 0x00400000UL,
133 RADEON_IS_PCI = 0x00800000UL,
134 RADEON_IS_IGPGART = 0x01000000UL,
135};
136
137
138/* 81/*
139 * Errata workarounds. 82 * Errata workarounds.
140 */ 83 */
diff --git a/drivers/gpu/drm/radeon/radeon_drv.h b/drivers/gpu/drm/radeon/radeon_drv.h
index cb0cfe4b3082..350962e0f346 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.h
+++ b/drivers/gpu/drm/radeon/radeon_drv.h
@@ -34,6 +34,8 @@
34#include <linux/firmware.h> 34#include <linux/firmware.h>
35#include <linux/platform_device.h> 35#include <linux/platform_device.h>
36 36
37#include "radeon_family.h"
38
37/* General customization: 39/* General customization:
38 */ 40 */
39 41
@@ -109,75 +111,12 @@
109#define DRIVER_MINOR 31 111#define DRIVER_MINOR 31
110#define DRIVER_PATCHLEVEL 0 112#define DRIVER_PATCHLEVEL 0
111 113
112/*
113 * Radeon chip families
114 */
115enum radeon_family {
116 CHIP_R100,
117 CHIP_RV100,
118 CHIP_RS100,
119 CHIP_RV200,
120 CHIP_RS200,
121 CHIP_R200,
122 CHIP_RV250,
123 CHIP_RS300,
124 CHIP_RV280,
125 CHIP_R300,
126 CHIP_R350,
127 CHIP_RV350,
128 CHIP_RV380,
129 CHIP_R420,
130 CHIP_R423,
131 CHIP_RV410,
132 CHIP_RS400,
133 CHIP_RS480,
134 CHIP_RS600,
135 CHIP_RS690,
136 CHIP_RS740,
137 CHIP_RV515,
138 CHIP_R520,
139 CHIP_RV530,
140 CHIP_RV560,
141 CHIP_RV570,
142 CHIP_R580,
143 CHIP_R600,
144 CHIP_RV610,
145 CHIP_RV630,
146 CHIP_RV620,
147 CHIP_RV635,
148 CHIP_RV670,
149 CHIP_RS780,
150 CHIP_RS880,
151 CHIP_RV770,
152 CHIP_RV730,
153 CHIP_RV710,
154 CHIP_RV740,
155 CHIP_LAST,
156};
157
158enum radeon_cp_microcode_version { 114enum radeon_cp_microcode_version {
159 UCODE_R100, 115 UCODE_R100,
160 UCODE_R200, 116 UCODE_R200,
161 UCODE_R300, 117 UCODE_R300,
162}; 118};
163 119
164/*
165 * Chip flags
166 */
167enum radeon_chip_flags {
168 RADEON_FAMILY_MASK = 0x0000ffffUL,
169 RADEON_FLAGS_MASK = 0xffff0000UL,
170 RADEON_IS_MOBILITY = 0x00010000UL,
171 RADEON_IS_IGP = 0x00020000UL,
172 RADEON_SINGLE_CRTC = 0x00040000UL,
173 RADEON_IS_AGP = 0x00080000UL,
174 RADEON_HAS_HIERZ = 0x00100000UL,
175 RADEON_IS_PCIE = 0x00200000UL,
176 RADEON_NEW_MEMMAP = 0x00400000UL,
177 RADEON_IS_PCI = 0x00800000UL,
178 RADEON_IS_IGPGART = 0x01000000UL,
179};
180
181typedef struct drm_radeon_freelist { 120typedef struct drm_radeon_freelist {
182 unsigned int age; 121 unsigned int age;
183 struct drm_buf *buf; 122 struct drm_buf *buf;
diff --git a/drivers/gpu/drm/radeon/radeon_family.h b/drivers/gpu/drm/radeon/radeon_family.h
new file mode 100644
index 000000000000..797972e344a6
--- /dev/null
+++ b/drivers/gpu/drm/radeon/radeon_family.h
@@ -0,0 +1,97 @@
1/*
2 * Copyright 2008 Advanced Micro Devices, Inc.
3 * Copyright 2008 Red Hat Inc.
4 * Copyright 2009 Jerome Glisse.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Authors: Dave Airlie
25 * Alex Deucher
26 * Jerome Glisse
27 */
28
29/* this file defines the CHIP_ and family flags used in the pciids,
30 * its is common between kms and non-kms because duplicating it and
31 * changing one place is fail.
32 */
33#ifndef RADEON_FAMILY_H
34#define RADEON_FAMILY_H
35/*
36 * Radeon chip families
37 */
38enum radeon_family {
39 CHIP_R100,
40 CHIP_RV100,
41 CHIP_RS100,
42 CHIP_RV200,
43 CHIP_RS200,
44 CHIP_R200,
45 CHIP_RV250,
46 CHIP_RS300,
47 CHIP_RV280,
48 CHIP_R300,
49 CHIP_R350,
50 CHIP_RV350,
51 CHIP_RV380,
52 CHIP_R420,
53 CHIP_R423,
54 CHIP_RV410,
55 CHIP_RS400,
56 CHIP_RS480,
57 CHIP_RS600,
58 CHIP_RS690,
59 CHIP_RS740,
60 CHIP_RV515,
61 CHIP_R520,
62 CHIP_RV530,
63 CHIP_RV560,
64 CHIP_RV570,
65 CHIP_R580,
66 CHIP_R600,
67 CHIP_RV610,
68 CHIP_RV630,
69 CHIP_RV670,
70 CHIP_RV620,
71 CHIP_RV635,
72 CHIP_RS780,
73 CHIP_RS880,
74 CHIP_RV770,
75 CHIP_RV730,
76 CHIP_RV710,
77 CHIP_RV740,
78 CHIP_LAST,
79};
80
81/*
82 * Chip flags
83 */
84enum radeon_chip_flags {
85 RADEON_FAMILY_MASK = 0x0000ffffUL,
86 RADEON_FLAGS_MASK = 0xffff0000UL,
87 RADEON_IS_MOBILITY = 0x00010000UL,
88 RADEON_IS_IGP = 0x00020000UL,
89 RADEON_SINGLE_CRTC = 0x00040000UL,
90 RADEON_IS_AGP = 0x00080000UL,
91 RADEON_HAS_HIERZ = 0x00100000UL,
92 RADEON_IS_PCIE = 0x00200000UL,
93 RADEON_NEW_MEMMAP = 0x00400000UL,
94 RADEON_IS_PCI = 0x00800000UL,
95 RADEON_IS_IGPGART = 0x01000000UL,
96};
97#endif