summaryrefslogtreecommitdiff
path: root/shared-core/radeon_cp.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core/radeon_cp.c')
-rw-r--r--shared-core/radeon_cp.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index 6987a84c..1e87ff37 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -858,7 +858,7 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev,
( ( dev_priv->gart_vm_start - 1 ) & 0xffff0000 )
| ( dev_priv->fb_location >> 16 ) );
-#if __REALLY_HAVE_AGP
+#if __OS_HAS_AGP
if (dev_priv->flags & CHIP_IS_AGP) {
RADEON_WRITE( RADEON_MC_AGP_LOCATION,
(((dev_priv->gart_vm_start - 1 +
@@ -885,7 +885,7 @@ static void radeon_cp_init_ring_buffer( drm_device_t *dev,
SET_RING_HEAD( dev_priv, cur_read_ptr );
dev_priv->ring.tail = cur_read_ptr;
-#if __REALLY_HAVE_AGP
+#if __OS_HAS_AGP
if (dev_priv->flags & CHIP_IS_AGP) {
/* set RADEON_AGP_BASE here instead of relying on X from user space */
RADEON_WRITE( RADEON_AGP_BASE, (unsigned int)dev->agp->base );
@@ -1146,7 +1146,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init )
(drm_radeon_sarea_t *)((u8 *)dev_priv->sarea->handle +
init->sarea_priv_offset);
-#if __REALLY_HAVE_AGP
+#if __OS_HAS_AGP
if ( dev_priv->flags & CHIP_IS_AGP ) {
drm_core_ioremap( dev_priv->cp_ring, dev );
drm_core_ioremap( dev_priv->ring_rptr, dev );
@@ -1195,7 +1195,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init )
dev_priv->gart_vm_start = dev_priv->fb_location
+ RADEON_READ( RADEON_CONFIG_APER_SIZE );
-#if __REALLY_HAVE_AGP
+#if __OS_HAS_AGP
if (dev_priv->flags & CHIP_IS_AGP)
dev_priv->gart_buffers_offset = (dev->agp_buffer_map->offset
- dev->agp->base
@@ -1224,7 +1224,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init )
dev_priv->ring.high_mark = RADEON_RING_HIGH_MARK;
-#if __REALLY_HAVE_AGP
+#if __OS_HAS_AGP
if (dev_priv->flags & CHIP_IS_AGP) {
/* Turn off PCI GART */
radeon_set_pcigart( dev_priv, 0 );
@@ -1257,15 +1257,13 @@ int radeon_do_cleanup_cp( drm_device_t *dev )
drm_radeon_private_t *dev_priv = dev->dev_private;
DRM_DEBUG( "\n" );
-#if __HAVE_IRQ
/* Make sure interrupts are disabled here because the uninstall ioctl
* may not have been called from userspace and after dev_private
* is freed, it's too late.
*/
if ( dev->irq_enabled ) DRM(irq_uninstall)(dev);
-#endif
-#if __REALLY_HAVE_AGP
+#if __OS_HAS_AGP
if (dev_priv->flags & CHIP_IS_AGP) {
if ( dev_priv->cp_ring != NULL ) {
drm_core_ioremapfree( dev_priv->cp_ring, dev );
@@ -1315,7 +1313,7 @@ static int radeon_do_resume_cp( drm_device_t *dev )
DRM_DEBUG("Starting radeon_do_resume_cp()\n");
-#if __REALLY_HAVE_AGP
+#if __OS_HAS_AGP
if (dev_priv->flags & CHIP_IS_AGP) {
/* Turn off PCI GART */
radeon_set_pcigart( dev_priv, 0 );