summaryrefslogtreecommitdiff
path: root/shared/radeon_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'shared/radeon_drv.h')
-rw-r--r--shared/radeon_drv.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/shared/radeon_drv.h b/shared/radeon_drv.h
index f0aa0dc23..4b66e5be9 100644
--- a/shared/radeon_drv.h
+++ b/shared/radeon_drv.h
@@ -31,6 +31,18 @@
#ifndef __RADEON_DRV_H__
#define __RADEON_DRV_H__
+/*
+ * Chip flags
+ */
+enum radeon_chip_flags {
+ CHIP_FAMILY_MASK = 0x0000ffffUL,
+ CHIP_FLAGS_MASK = 0xffff0000UL,
+ CHIP_IS_MOBILITY = 0x00010000UL,
+ CHIP_IS_IGP = 0x00020000UL,
+ CHIP_SINGLE_CRTC = 0x00040000UL,
+ CHIP_IS_AGP = 0x00080000UL,
+};
+
#define GET_RING_HEAD(dev_priv) DRM_READ32( (dev_priv)->ring_rptr, 0 )
#define SET_RING_HEAD(dev_priv,val) DRM_WRITE32( (dev_priv)->ring_rptr, 0, (val) )
@@ -70,6 +82,9 @@ struct mem_block {
};
typedef struct drm_radeon_private {
+
+ uint32_t flags; /* see radeon_chip_flags */
+
drm_radeon_ring_buffer_t ring;
drm_radeon_sarea_t *sarea_priv;
@@ -92,7 +107,6 @@ typedef struct drm_radeon_private {
int is_r200;
- int is_pci;
unsigned long phys_pci_gart;
dma_addr_t bus_pci_gart;
@@ -211,13 +225,13 @@ extern void radeon_do_release(drm_device_t *dev);
#define RADEON_BOX_WAIT_IDLE 0x8
#define RADEON_BOX_TEXTURE_LOAD 0x10
-
-
/* Register definitions, register access macros and drmAddMap constants
* for Radeon kernel driver.
*/
-
#define RADEON_AGP_COMMAND 0x0f60
+#define RADEON_AGP_COMMAND_PCI_CONFIG 0x0060 /* offset in PCI config*/
+# define RADEON_AGP_ENABLE (1<<8)
+
#define RADEON_AUX_SCISSOR_CNTL 0x26f0
# define RADEON_EXCLUSIVE_SCISSOR_0 (1 << 24)
# define RADEON_EXCLUSIVE_SCISSOR_1 (1 << 25)
@@ -240,6 +254,11 @@ extern void radeon_do_release(drm_device_t *dev);
#define RADEON_CRTC2_OFFSET 0x0324
#define RADEON_CRTC2_OFFSET_CNTL 0x0328
+#define RADEON_MPP_TB_CONFIG 0x01c0
+#define RADEON_MEM_CNTL 0x0140
+#define RADEON_MEM_SDRAM_MODE_REG 0x0158
+#define RADEON_AGP_BASE 0x0170
+
#define RADEON_RB3D_COLOROFFSET 0x1c40
#define RADEON_RB3D_COLORPITCH 0x1c48
@@ -718,7 +737,9 @@ do { \
} while (0)
extern int RADEON_READ_PLL( drm_device_t *dev, int addr );
-
+extern int radeon_preinit( struct drm_device *dev, unsigned long flags );
+extern int radeon_postinit( struct drm_device *dev, unsigned long flags );
+extern int radeon_postcleanup( struct drm_device *dev );
#define CP_PACKET0( reg, n ) \
(RADEON_CP_PACKET0 | ((n) << 16) | ((reg) >> 2))