blob: 4415a5ee5871df1e353c947dd31a1dd65181cd45 [file] [log] [blame]
Jerome Glisse771fe6b2009-06-05 14:42:42 +02001/*
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#include <linux/seq_file.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090029#include <linux/slab.h>
Jerome Glisse771fe6b2009-06-05 14:42:42 +020030#include "drmP.h"
31#include "radeon_reg.h"
32#include "radeon.h"
Daniel Vettere6990372010-03-11 21:19:17 +000033#include "radeon_asic.h"
Jerome Glisse9f022dd2009-09-11 15:35:22 +020034#include "atom.h"
Corbin Simpson62cdc0c2010-01-06 19:28:48 +010035#include "r100d.h"
Jerome Glisse905b6822009-09-09 22:24:20 +020036#include "r420d.h"
Alex Deucher804c7552010-01-08 15:58:49 -050037#include "r420_reg_safe.h"
38
Alex Deucherce8f5372010-05-07 15:10:16 -040039void r420_pm_init_profile(struct radeon_device *rdev)
40{
41 /* default */
42 rdev->pm.profiles[PM_PROFILE_DEFAULT_IDX].dpms_off_ps_idx = rdev->pm.default_power_state_index;
43 rdev->pm.profiles[PM_PROFILE_DEFAULT_IDX].dpms_on_ps_idx = rdev->pm.default_power_state_index;
44 rdev->pm.profiles[PM_PROFILE_DEFAULT_IDX].dpms_off_cm_idx = 0;
45 rdev->pm.profiles[PM_PROFILE_DEFAULT_IDX].dpms_on_cm_idx = 0;
46 /* low sh */
47 rdev->pm.profiles[PM_PROFILE_LOW_SH_IDX].dpms_off_ps_idx = 0;
48 rdev->pm.profiles[PM_PROFILE_LOW_SH_IDX].dpms_on_ps_idx = 1;
49 rdev->pm.profiles[PM_PROFILE_LOW_SH_IDX].dpms_off_cm_idx = 0;
50 rdev->pm.profiles[PM_PROFILE_LOW_SH_IDX].dpms_on_cm_idx = 0;
51 /* high sh */
52 rdev->pm.profiles[PM_PROFILE_HIGH_SH_IDX].dpms_off_ps_idx = 0;
53 rdev->pm.profiles[PM_PROFILE_HIGH_SH_IDX].dpms_on_ps_idx = rdev->pm.default_power_state_index;
54 rdev->pm.profiles[PM_PROFILE_HIGH_SH_IDX].dpms_off_cm_idx = 0;
55 rdev->pm.profiles[PM_PROFILE_HIGH_SH_IDX].dpms_on_cm_idx = 0;
56 /* low mh */
57 rdev->pm.profiles[PM_PROFILE_LOW_MH_IDX].dpms_off_ps_idx = 0;
58 rdev->pm.profiles[PM_PROFILE_LOW_MH_IDX].dpms_on_ps_idx = rdev->pm.default_power_state_index;
59 rdev->pm.profiles[PM_PROFILE_LOW_MH_IDX].dpms_off_cm_idx = 0;
60 rdev->pm.profiles[PM_PROFILE_LOW_MH_IDX].dpms_on_cm_idx = 0;
61 /* high mh */
62 rdev->pm.profiles[PM_PROFILE_HIGH_MH_IDX].dpms_off_ps_idx = 0;
63 rdev->pm.profiles[PM_PROFILE_HIGH_MH_IDX].dpms_on_ps_idx = rdev->pm.default_power_state_index;
64 rdev->pm.profiles[PM_PROFILE_HIGH_MH_IDX].dpms_off_cm_idx = 0;
65 rdev->pm.profiles[PM_PROFILE_HIGH_MH_IDX].dpms_on_cm_idx = 0;
66}
67
Alex Deucher804c7552010-01-08 15:58:49 -050068static void r420_set_reg_safe(struct radeon_device *rdev)
69{
70 rdev->config.r300.reg_safe_bm = r420_reg_safe_bm;
71 rdev->config.r300.reg_safe_bm_size = ARRAY_SIZE(r420_reg_safe_bm);
72}
Jerome Glisse771fe6b2009-06-05 14:42:42 +020073
Jerome Glisse771fe6b2009-06-05 14:42:42 +020074void r420_pipes_init(struct radeon_device *rdev)
75{
76 unsigned tmp;
77 unsigned gb_pipe_select;
78 unsigned num_pipes;
79
80 /* GA_ENHANCE workaround TCL deadlock issue */
Alex Deucher4612dc92010-02-05 01:58:28 -050081 WREG32(R300_GA_ENHANCE, R300_GA_DEADLOCK_CNTL | R300_GA_FASTSYNC_CNTL |
82 (1 << 2) | (1 << 3));
Dave Airlie18a4cd2e2009-09-21 14:15:10 +100083 /* add idle wait as per freedesktop.org bug 24041 */
84 if (r100_gui_wait_for_idle(rdev)) {
85 printk(KERN_WARNING "Failed to wait GUI idle while "
86 "programming pipes. Bad things might happen.\n");
87 }
Jerome Glisse771fe6b2009-06-05 14:42:42 +020088 /* get max number of pipes */
89 gb_pipe_select = RREG32(0x402C);
90 num_pipes = ((gb_pipe_select >> 12) & 3) + 1;
Tormod Volden94f7bf62010-04-22 16:57:32 -040091
92 /* SE chips have 1 pipe */
93 if ((rdev->pdev->device == 0x5e4c) ||
94 (rdev->pdev->device == 0x5e4f))
95 num_pipes = 1;
96
Jerome Glisse771fe6b2009-06-05 14:42:42 +020097 rdev->num_gb_pipes = num_pipes;
98 tmp = 0;
99 switch (num_pipes) {
100 default:
101 /* force to 1 pipe */
102 num_pipes = 1;
103 case 1:
104 tmp = (0 << 1);
105 break;
106 case 2:
107 tmp = (3 << 1);
108 break;
109 case 3:
110 tmp = (6 << 1);
111 break;
112 case 4:
113 tmp = (7 << 1);
114 break;
115 }
Alex Deucher4612dc92010-02-05 01:58:28 -0500116 WREG32(R500_SU_REG_DEST, (1 << num_pipes) - 1);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200117 /* Sub pixel 1/12 so we can have 4K rendering according to doc */
Alex Deucher4612dc92010-02-05 01:58:28 -0500118 tmp |= R300_TILE_SIZE_16 | R300_ENABLE_TILING;
119 WREG32(R300_GB_TILE_CONFIG, tmp);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200120 if (r100_gui_wait_for_idle(rdev)) {
121 printk(KERN_WARNING "Failed to wait GUI idle while "
122 "programming pipes. Bad things might happen.\n");
123 }
124
Alex Deucher4612dc92010-02-05 01:58:28 -0500125 tmp = RREG32(R300_DST_PIPE_CONFIG);
126 WREG32(R300_DST_PIPE_CONFIG, tmp | R300_PIPE_AUTO_CONFIG);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200127
128 WREG32(R300_RB2D_DSTCACHE_MODE,
129 RREG32(R300_RB2D_DSTCACHE_MODE) |
130 R300_DC_AUTOFLUSH_ENABLE |
131 R300_DC_DC_DISABLE_IGNORE_PE);
132
133 if (r100_gui_wait_for_idle(rdev)) {
134 printk(KERN_WARNING "Failed to wait GUI idle while "
135 "programming pipes. Bad things might happen.\n");
136 }
Alex Deucherf779b3e2009-08-19 19:11:39 -0400137
138 if (rdev->family == CHIP_RV530) {
139 tmp = RREG32(RV530_GB_PIPE_SELECT2);
140 if ((tmp & 3) == 3)
141 rdev->num_z_pipes = 2;
142 else
143 rdev->num_z_pipes = 1;
144 } else
145 rdev->num_z_pipes = 1;
146
147 DRM_INFO("radeon: %d quad pipes, %d z pipes initialized.\n",
148 rdev->num_gb_pipes, rdev->num_z_pipes);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200149}
150
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200151u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg)
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200152{
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200153 u32 r;
154
155 WREG32(R_0001F8_MC_IND_INDEX, S_0001F8_MC_IND_ADDR(reg));
156 r = RREG32(R_0001FC_MC_IND_DATA);
157 return r;
158}
159
160void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v)
161{
162 WREG32(R_0001F8_MC_IND_INDEX, S_0001F8_MC_IND_ADDR(reg) |
163 S_0001F8_MC_IND_WR_EN(1));
164 WREG32(R_0001FC_MC_IND_DATA, v);
165}
166
167static void r420_debugfs(struct radeon_device *rdev)
168{
169 if (r100_debugfs_rbbm_init(rdev)) {
170 DRM_ERROR("Failed to register debugfs file for RBBM !\n");
171 }
172 if (r420_debugfs_pipes_info_init(rdev)) {
173 DRM_ERROR("Failed to register debugfs file for pipes !\n");
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200174 }
175}
176
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200177static void r420_clock_resume(struct radeon_device *rdev)
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200178{
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200179 u32 sclk_cntl;
Jerome Glisseca6ffc62009-10-01 10:20:52 +0200180
181 if (radeon_dynclks != -1 && radeon_dynclks)
182 radeon_atom_set_clock_gating(rdev, 1);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200183 sclk_cntl = RREG32_PLL(R_00000D_SCLK_CNTL);
184 sclk_cntl |= S_00000D_FORCE_CP(1) | S_00000D_FORCE_VIP(1);
185 if (rdev->family == CHIP_R420)
186 sclk_cntl |= S_00000D_FORCE_PX(1) | S_00000D_FORCE_TX(1);
187 WREG32_PLL(R_00000D_SCLK_CNTL, sclk_cntl);
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200188}
189
Corbin Simpson62cdc0c2010-01-06 19:28:48 +0100190static void r420_cp_errata_init(struct radeon_device *rdev)
191{
192 /* RV410 and R420 can lock up if CP DMA to host memory happens
193 * while the 2D engine is busy.
194 *
195 * The proper workaround is to queue a RESYNC at the beginning
196 * of the CP init, apparently.
197 */
198 radeon_scratch_get(rdev, &rdev->config.r300.resync_scratch);
199 radeon_ring_lock(rdev, 8);
200 radeon_ring_write(rdev, PACKET0(R300_CP_RESYNC_ADDR, 1));
201 radeon_ring_write(rdev, rdev->config.r300.resync_scratch);
202 radeon_ring_write(rdev, 0xDEADBEEF);
203 radeon_ring_unlock_commit(rdev);
204}
205
206static void r420_cp_errata_fini(struct radeon_device *rdev)
207{
208 /* Catch the RESYNC we dispatched all the way back,
209 * at the very beginning of the CP init.
210 */
211 radeon_ring_lock(rdev, 8);
212 radeon_ring_write(rdev, PACKET0(R300_RB3D_DSTCACHE_CTLSTAT, 0));
213 radeon_ring_write(rdev, R300_RB3D_DC_FINISH);
214 radeon_ring_unlock_commit(rdev);
215 radeon_scratch_free(rdev, rdev->config.r300.resync_scratch);
216}
217
Dave Airliefc30b8e2009-09-18 15:19:37 +1000218static int r420_startup(struct radeon_device *rdev)
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200219{
220 int r;
221
Alex Deucher92cde002009-12-04 10:55:12 -0500222 /* set common regs */
223 r100_set_common_regs(rdev);
224 /* program mc */
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200225 r300_mc_program(rdev);
Jerome Glisseca6ffc62009-10-01 10:20:52 +0200226 /* Resume clock */
227 r420_clock_resume(rdev);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200228 /* Initialize GART (initialize after TTM so we can allocate
229 * memory through TTM but finalize after TTM) */
Jerome Glisse4aac0472009-09-14 18:29:49 +0200230 if (rdev->flags & RADEON_IS_PCIE) {
231 r = rv370_pcie_gart_enable(rdev);
232 if (r)
233 return r;
234 }
235 if (rdev->flags & RADEON_IS_PCI) {
236 r = r100_pci_gart_enable(rdev);
237 if (r)
238 return r;
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200239 }
240 r420_pipes_init(rdev);
241 /* Enable IRQ */
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200242 r100_irq_set(rdev);
Jerome Glissecafe6602010-01-07 12:39:21 +0100243 rdev->config.r300.hdp_cntl = RREG32(RADEON_HOST_PATH_CNTL);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200244 /* 1M ring buffer */
245 r = r100_cp_init(rdev, 1024 * 1024);
246 if (r) {
247 dev_err(rdev->dev, "failled initializing CP (%d).\n", r);
248 return r;
249 }
Corbin Simpson62cdc0c2010-01-06 19:28:48 +0100250 r420_cp_errata_init(rdev);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200251 r = r100_wb_init(rdev);
252 if (r) {
253 dev_err(rdev->dev, "failled initializing WB (%d).\n", r);
254 }
255 r = r100_ib_init(rdev);
256 if (r) {
257 dev_err(rdev->dev, "failled initializing IB (%d).\n", r);
258 return r;
259 }
260 return 0;
261}
262
Dave Airliefc30b8e2009-09-18 15:19:37 +1000263int r420_resume(struct radeon_device *rdev)
264{
265 /* Make sur GART are not working */
266 if (rdev->flags & RADEON_IS_PCIE)
267 rv370_pcie_gart_disable(rdev);
268 if (rdev->flags & RADEON_IS_PCI)
269 r100_pci_gart_disable(rdev);
270 /* Resume clock before doing reset */
271 r420_clock_resume(rdev);
272 /* Reset gpu before posting otherwise ATOM will enter infinite loop */
Jerome Glissea2d07b72010-03-09 14:45:11 +0000273 if (radeon_asic_reset(rdev)) {
Dave Airliefc30b8e2009-09-18 15:19:37 +1000274 dev_warn(rdev->dev, "GPU reset failed ! (0xE40=0x%08X, 0x7C0=0x%08X)\n",
275 RREG32(R_000E40_RBBM_STATUS),
276 RREG32(R_0007C0_CP_STAT));
277 }
278 /* check if cards are posted or not */
279 if (rdev->is_atom_bios) {
280 atom_asic_init(rdev->mode_info.atom_context);
281 } else {
282 radeon_combios_asic_init(rdev->ddev);
283 }
284 /* Resume clock after posting */
285 r420_clock_resume(rdev);
Dave Airlie550e2d92009-12-09 14:15:38 +1000286 /* Initialize surface registers */
287 radeon_surface_init(rdev);
Dave Airliefc30b8e2009-09-18 15:19:37 +1000288 return r420_startup(rdev);
289}
290
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200291int r420_suspend(struct radeon_device *rdev)
292{
Corbin Simpson62cdc0c2010-01-06 19:28:48 +0100293 r420_cp_errata_fini(rdev);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200294 r100_cp_disable(rdev);
295 r100_wb_disable(rdev);
296 r100_irq_disable(rdev);
Jerome Glisse4aac0472009-09-14 18:29:49 +0200297 if (rdev->flags & RADEON_IS_PCIE)
298 rv370_pcie_gart_disable(rdev);
299 if (rdev->flags & RADEON_IS_PCI)
300 r100_pci_gart_disable(rdev);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200301 return 0;
302}
303
304void r420_fini(struct radeon_device *rdev)
305{
306 r100_cp_fini(rdev);
307 r100_wb_fini(rdev);
308 r100_ib_fini(rdev);
309 radeon_gem_fini(rdev);
Jerome Glisse4aac0472009-09-14 18:29:49 +0200310 if (rdev->flags & RADEON_IS_PCIE)
311 rv370_pcie_gart_fini(rdev);
312 if (rdev->flags & RADEON_IS_PCI)
313 r100_pci_gart_fini(rdev);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200314 radeon_agp_fini(rdev);
315 radeon_irq_kms_fini(rdev);
316 radeon_fence_driver_fini(rdev);
Jerome Glisse4c788672009-11-20 14:29:23 +0100317 radeon_bo_fini(rdev);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200318 if (rdev->is_atom_bios) {
319 radeon_atombios_fini(rdev);
320 } else {
321 radeon_combios_fini(rdev);
322 }
323 kfree(rdev->bios);
324 rdev->bios = NULL;
325}
326
327int r420_init(struct radeon_device *rdev)
328{
329 int r;
330
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200331 /* Initialize scratch registers */
332 radeon_scratch_init(rdev);
333 /* Initialize surface registers */
334 radeon_surface_init(rdev);
335 /* TODO: disable VGA need to use VGA request */
336 /* BIOS*/
337 if (!radeon_get_bios(rdev)) {
338 if (ASIC_IS_AVIVO(rdev))
339 return -EINVAL;
340 }
341 if (rdev->is_atom_bios) {
342 r = radeon_atombios_init(rdev);
343 if (r) {
344 return r;
345 }
346 } else {
347 r = radeon_combios_init(rdev);
348 if (r) {
349 return r;
350 }
351 }
352 /* Reset gpu before posting otherwise ATOM will enter infinite loop */
Jerome Glissea2d07b72010-03-09 14:45:11 +0000353 if (radeon_asic_reset(rdev)) {
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200354 dev_warn(rdev->dev,
355 "GPU reset failed ! (0xE40=0x%08X, 0x7C0=0x%08X)\n",
356 RREG32(R_000E40_RBBM_STATUS),
357 RREG32(R_0007C0_CP_STAT));
358 }
359 /* check if cards are posted or not */
Dave Airlie72542d72009-12-01 14:06:31 +1000360 if (radeon_boot_test_post_card(rdev) == false)
361 return -EINVAL;
362
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200363 /* Initialize clocks */
364 radeon_get_clock_info(rdev->ddev);
Jerome Glissed594e462010-02-17 21:54:29 +0000365 /* initialize AGP */
366 if (rdev->flags & RADEON_IS_AGP) {
367 r = radeon_agp_init(rdev);
368 if (r) {
369 radeon_agp_disable(rdev);
370 }
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200371 }
Jerome Glissed594e462010-02-17 21:54:29 +0000372 /* initialize memory controller */
373 r300_mc_init(rdev);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200374 r420_debugfs(rdev);
375 /* Fence driver */
376 r = radeon_fence_driver_init(rdev);
377 if (r) {
378 return r;
379 }
380 r = radeon_irq_kms_init(rdev);
381 if (r) {
382 return r;
383 }
384 /* Memory manager */
Jerome Glisse4c788672009-11-20 14:29:23 +0100385 r = radeon_bo_init(rdev);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200386 if (r) {
387 return r;
388 }
Dave Airlie17e15b02009-11-05 15:36:53 +1000389 if (rdev->family == CHIP_R420)
390 r100_enable_bm(rdev);
391
Jerome Glisse4aac0472009-09-14 18:29:49 +0200392 if (rdev->flags & RADEON_IS_PCIE) {
393 r = rv370_pcie_gart_init(rdev);
394 if (r)
395 return r;
396 }
397 if (rdev->flags & RADEON_IS_PCI) {
398 r = r100_pci_gart_init(rdev);
399 if (r)
400 return r;
401 }
Alex Deucher804c7552010-01-08 15:58:49 -0500402 r420_set_reg_safe(rdev);
Jerome Glisse733289c2009-09-16 15:24:21 +0200403 rdev->accel_working = true;
Dave Airliefc30b8e2009-09-18 15:19:37 +1000404 r = r420_startup(rdev);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200405 if (r) {
406 /* Somethings want wront with the accel init stop accel */
407 dev_err(rdev->dev, "Disabling GPU acceleration\n");
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200408 r100_cp_fini(rdev);
409 r100_wb_fini(rdev);
410 r100_ib_fini(rdev);
Jerome Glisse655efd32010-02-02 11:51:45 +0100411 radeon_irq_kms_fini(rdev);
Jerome Glisse4aac0472009-09-14 18:29:49 +0200412 if (rdev->flags & RADEON_IS_PCIE)
413 rv370_pcie_gart_fini(rdev);
414 if (rdev->flags & RADEON_IS_PCI)
415 r100_pci_gart_fini(rdev);
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200416 radeon_agp_fini(rdev);
Jerome Glisse733289c2009-09-16 15:24:21 +0200417 rdev->accel_working = false;
Jerome Glisse9f022dd2009-09-11 15:35:22 +0200418 }
419 return 0;
420}
Jerome Glisse771fe6b2009-06-05 14:42:42 +0200421
422/*
423 * Debugfs info
424 */
425#if defined(CONFIG_DEBUG_FS)
426static int r420_debugfs_pipes_info(struct seq_file *m, void *data)
427{
428 struct drm_info_node *node = (struct drm_info_node *) m->private;
429 struct drm_device *dev = node->minor->dev;
430 struct radeon_device *rdev = dev->dev_private;
431 uint32_t tmp;
432
433 tmp = RREG32(R400_GB_PIPE_SELECT);
434 seq_printf(m, "GB_PIPE_SELECT 0x%08x\n", tmp);
435 tmp = RREG32(R300_GB_TILE_CONFIG);
436 seq_printf(m, "GB_TILE_CONFIG 0x%08x\n", tmp);
437 tmp = RREG32(R300_DST_PIPE_CONFIG);
438 seq_printf(m, "DST_PIPE_CONFIG 0x%08x\n", tmp);
439 return 0;
440}
441
442static struct drm_info_list r420_pipes_info_list[] = {
443 {"r420_pipes_info", r420_debugfs_pipes_info, 0, NULL},
444};
445#endif
446
447int r420_debugfs_pipes_info_init(struct radeon_device *rdev)
448{
449#if defined(CONFIG_DEBUG_FS)
450 return radeon_debugfs_add_files(rdev, r420_pipes_info_list, 1);
451#else
452 return 0;
453#endif
454}