diff options
author | Dave Airlie <airlied@redhat.com> | 2008-02-07 00:01:05 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-02-07 00:13:40 -0500 |
commit | 3d5e2c13b13468f5eb2ac9323690af7e17f195fe (patch) | |
tree | c282c2a8413ca5096877360d86402df08bec6b3a /drivers/char/drm/radeon_drv.h | |
parent | 576cc458a64673ecf3fa7f1bab751e52fd939071 (diff) |
drm: add initial r500 drm support
This adds CP support for the r500 series of chips, and allows
accel 2D support on these chips with a new radeon driver.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char/drm/radeon_drv.h')
-rw-r--r-- | drivers/char/drm/radeon_drv.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h index 443a8952eced..4434332c79bc 100644 --- a/drivers/char/drm/radeon_drv.h +++ b/drivers/char/drm/radeon_drv.h | |||
@@ -123,6 +123,12 @@ enum radeon_family { | |||
123 | CHIP_R420, | 123 | CHIP_R420, |
124 | CHIP_RV410, | 124 | CHIP_RV410, |
125 | CHIP_RS400, | 125 | CHIP_RS400, |
126 | CHIP_RV515, | ||
127 | CHIP_R520, | ||
128 | CHIP_RV530, | ||
129 | CHIP_RV560, | ||
130 | CHIP_RV570, | ||
131 | CHIP_R580, | ||
126 | CHIP_LAST, | 132 | CHIP_LAST, |
127 | }; | 133 | }; |
128 | 134 | ||
@@ -342,6 +348,7 @@ extern int radeon_cp_resume(struct drm_device *dev, void *data, struct drm_file | |||
342 | extern int radeon_engine_reset(struct drm_device *dev, void *data, struct drm_file *file_priv); | 348 | extern int radeon_engine_reset(struct drm_device *dev, void *data, struct drm_file *file_priv); |
343 | extern int radeon_fullscreen(struct drm_device *dev, void *data, struct drm_file *file_priv); | 349 | extern int radeon_fullscreen(struct drm_device *dev, void *data, struct drm_file *file_priv); |
344 | extern int radeon_cp_buffers(struct drm_device *dev, void *data, struct drm_file *file_priv); | 350 | extern int radeon_cp_buffers(struct drm_device *dev, void *data, struct drm_file *file_priv); |
351 | extern u32 radeon_read_fb_location(drm_radeon_private_t *dev_priv); | ||
345 | 352 | ||
346 | extern void radeon_freelist_reset(struct drm_device * dev); | 353 | extern void radeon_freelist_reset(struct drm_device * dev); |
347 | extern struct drm_buf *radeon_freelist_get(struct drm_device * dev); | 354 | extern struct drm_buf *radeon_freelist_get(struct drm_device * dev); |
@@ -388,7 +395,7 @@ extern long radeon_compat_ioctl(struct file *filp, unsigned int cmd, | |||
388 | unsigned long arg); | 395 | unsigned long arg); |
389 | 396 | ||
390 | /* r300_cmdbuf.c */ | 397 | /* r300_cmdbuf.c */ |
391 | extern void r300_init_reg_flags(void); | 398 | extern void r300_init_reg_flags(struct drm_device *dev); |
392 | 399 | ||
393 | extern int r300_do_cp_cmdbuf(struct drm_device * dev, | 400 | extern int r300_do_cp_cmdbuf(struct drm_device * dev, |
394 | struct drm_file *file_priv, | 401 | struct drm_file *file_priv, |
@@ -460,6 +467,16 @@ extern int r300_do_cp_cmdbuf(struct drm_device * dev, | |||
460 | #define RADEON_IGPGART_ENABLE 0x38 | 467 | #define RADEON_IGPGART_ENABLE 0x38 |
461 | #define RADEON_IGPGART_UNK_39 0x39 | 468 | #define RADEON_IGPGART_UNK_39 0x39 |
462 | 469 | ||
470 | #define R520_MC_IND_INDEX 0x70 | ||
471 | #define R520_MC_IND_WR_EN (1<<24) | ||
472 | #define R520_MC_IND_DATA 0x74 | ||
473 | |||
474 | #define RV515_MC_FB_LOCATION 0x01 | ||
475 | #define RV515_MC_AGP_LOCATION 0x02 | ||
476 | |||
477 | #define R520_MC_FB_LOCATION 0x04 | ||
478 | #define R520_MC_AGP_LOCATION 0x05 | ||
479 | |||
463 | #define RADEON_MPP_TB_CONFIG 0x01c0 | 480 | #define RADEON_MPP_TB_CONFIG 0x01c0 |
464 | #define RADEON_MEM_CNTL 0x0140 | 481 | #define RADEON_MEM_CNTL 0x0140 |
465 | #define RADEON_MEM_SDRAM_MODE_REG 0x0158 | 482 | #define RADEON_MEM_SDRAM_MODE_REG 0x0158 |
@@ -1052,6 +1069,13 @@ do { \ | |||
1052 | RADEON_WRITE( RADEON_PCIE_DATA, (val) ); \ | 1069 | RADEON_WRITE( RADEON_PCIE_DATA, (val) ); \ |
1053 | } while (0) | 1070 | } while (0) |
1054 | 1071 | ||
1072 | #define RADEON_WRITE_MCIND( addr, val ) \ | ||
1073 | do { \ | ||
1074 | RADEON_WRITE(R520_MC_IND_INDEX, 0xff0000 | ((addr) & 0xff)); \ | ||
1075 | RADEON_WRITE(R520_MC_IND_DATA, (val)); \ | ||
1076 | RADEON_WRITE(R520_MC_IND_INDEX, 0); \ | ||
1077 | } while (0) | ||
1078 | |||
1055 | #define CP_PACKET0( reg, n ) \ | 1079 | #define CP_PACKET0( reg, n ) \ |
1056 | (RADEON_CP_PACKET0 | ((n) << 16) | ((reg) >> 2)) | 1080 | (RADEON_CP_PACKET0 | ((n) << 16) | ((reg) >> 2)) |
1057 | #define CP_PACKET0_TABLE( reg, n ) \ | 1081 | #define CP_PACKET0_TABLE( reg, n ) \ |