aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/radeon_drv.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-05-08 01:19:23 -0400
committerDave Airlie <airlied@linux.ie>2007-05-08 01:19:23 -0400
commitf2b04cd219e5c0f1214c0eeeec814ddd08a12c1b (patch)
treefa114ea7f96b5985e10c7f8696d635b074649bab /drivers/char/drm/radeon_drv.h
parent5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff)
drm/radeon: upgrade to 1.27 - make PCI GART more flexible
radeon: make PCI GART aperture size variable, but making table size variable This is precursor to getting a TTM backend for this stuff, and also allows the PCI table to be allocated at fb 0 radeon: add support for reverse engineered xpress200m The IGPGART setup code was traced using mmio-trace on fglrx by myself and Phillip Ezolt <phillipezolt@gmail.com> on dri-devel. This code doesn't let the 3D driver work properly as the card has no vertex shader support. Thanks to Matthew Garrett + Ubuntu for providing me some hardware to do this work on. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/radeon_drv.h')
-rw-r--r--drivers/char/drm/radeon_drv.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/char/drm/radeon_drv.h b/drivers/char/drm/radeon_drv.h
index 8b105f1460a7..97c27da2d26d 100644
--- a/drivers/char/drm/radeon_drv.h
+++ b/drivers/char/drm/radeon_drv.h
@@ -95,9 +95,11 @@
95 * 1.24- Add general-purpose packet for manipulating scratch registers (r300) 95 * 1.24- Add general-purpose packet for manipulating scratch registers (r300)
96 * 1.25- Add support for r200 vertex programs (R200_EMIT_VAP_PVS_CNTL, 96 * 1.25- Add support for r200 vertex programs (R200_EMIT_VAP_PVS_CNTL,
97 * new packet type) 97 * new packet type)
98 * 1.26- Add support for variable size PCI(E) gart aperture
99 * 1.27- Add support for IGP GART
98 */ 100 */
99#define DRIVER_MAJOR 1 101#define DRIVER_MAJOR 1
100#define DRIVER_MINOR 25 102#define DRIVER_MINOR 27
101#define DRIVER_PATCHLEVEL 0 103#define DRIVER_PATCHLEVEL 0
102 104
103/* 105/*
@@ -143,6 +145,7 @@ enum radeon_chip_flags {
143 RADEON_IS_PCIE = 0x00200000UL, 145 RADEON_IS_PCIE = 0x00200000UL,
144 RADEON_NEW_MEMMAP = 0x00400000UL, 146 RADEON_NEW_MEMMAP = 0x00400000UL,
145 RADEON_IS_PCI = 0x00800000UL, 147 RADEON_IS_PCI = 0x00800000UL,
148 RADEON_IS_IGPGART = 0x01000000UL,
146}; 149};
147 150
148#define GET_RING_HEAD(dev_priv) (dev_priv->writeback_works ? \ 151#define GET_RING_HEAD(dev_priv) (dev_priv->writeback_works ? \
@@ -280,6 +283,7 @@ typedef struct drm_radeon_private {
280 struct radeon_virt_surface virt_surfaces[2 * RADEON_MAX_SURFACES]; 283 struct radeon_virt_surface virt_surfaces[2 * RADEON_MAX_SURFACES];
281 284
282 unsigned long pcigart_offset; 285 unsigned long pcigart_offset;
286 unsigned int pcigart_offset_set;
283 drm_ati_pcigart_info gart_info; 287 drm_ati_pcigart_info gart_info;
284 288
285 u32 scratch_ages[5]; 289 u32 scratch_ages[5];
@@ -432,6 +436,15 @@ extern int r300_do_cp_cmdbuf(drm_device_t * dev, DRMFILE filp,
432#define RADEON_PCIE_TX_GART_END_LO 0x16 436#define RADEON_PCIE_TX_GART_END_LO 0x16
433#define RADEON_PCIE_TX_GART_END_HI 0x17 437#define RADEON_PCIE_TX_GART_END_HI 0x17
434 438
439#define RADEON_IGPGART_INDEX 0x168
440#define RADEON_IGPGART_DATA 0x16c
441#define RADEON_IGPGART_UNK_18 0x18
442#define RADEON_IGPGART_CTRL 0x2b
443#define RADEON_IGPGART_BASE_ADDR 0x2c
444#define RADEON_IGPGART_FLUSH 0x2e
445#define RADEON_IGPGART_ENABLE 0x38
446#define RADEON_IGPGART_UNK_39 0x39
447
435#define RADEON_MPP_TB_CONFIG 0x01c0 448#define RADEON_MPP_TB_CONFIG 0x01c0
436#define RADEON_MEM_CNTL 0x0140 449#define RADEON_MEM_CNTL 0x0140
437#define RADEON_MEM_SDRAM_MODE_REG 0x0158 450#define RADEON_MEM_SDRAM_MODE_REG 0x0158
@@ -964,6 +977,14 @@ do { \
964 RADEON_WRITE( RADEON_CLOCK_CNTL_DATA, (val) ); \ 977 RADEON_WRITE( RADEON_CLOCK_CNTL_DATA, (val) ); \
965} while (0) 978} while (0)
966 979
980#define RADEON_WRITE_IGPGART( addr, val ) \
981do { \
982 RADEON_WRITE( RADEON_IGPGART_INDEX, \
983 ((addr) & 0x7f) | (1 << 8)); \
984 RADEON_WRITE( RADEON_IGPGART_DATA, (val) ); \
985 RADEON_WRITE( RADEON_IGPGART_INDEX, 0x7f ); \
986} while (0)
987
967#define RADEON_WRITE_PCIE( addr, val ) \ 988#define RADEON_WRITE_PCIE( addr, val ) \
968do { \ 989do { \
969 RADEON_WRITE8( RADEON_PCIE_INDEX, \ 990 RADEON_WRITE8( RADEON_PCIE_INDEX, \