summaryrefslogtreecommitdiff
path: root/shared/radeon_cp.c
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-09-27 19:51:38 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-09-27 19:51:38 +0000
commitfa6b1d129e7bf8acf41e66c9c665ae9f9c1d5b0d (patch)
treec0b8605f134c4fe96a78f5b30644d25ac5ebcdf9 /shared/radeon_cp.c
parent77fa7b9548bf7a5bf5e49515f1a478c27ede07a7 (diff)
First check in for DRM that splits core from personality modules
Diffstat (limited to 'shared/radeon_cp.c')
-rw-r--r--shared/radeon_cp.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/shared/radeon_cp.c b/shared/radeon_cp.c
index cbde7ce9..78c41b5d 100644
--- a/shared/radeon_cp.c
+++ b/shared/radeon_cp.c
@@ -28,7 +28,6 @@
* Gareth Hughes <gareth@valinux.com>
*/
-#include "radeon.h"
#include "drmP.h"
#include "drm.h"
#include "radeon_drm.h"
@@ -1216,7 +1215,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init )
dev_priv->ring.end = ((u32 *)dev_priv->cp_ring->handle
+ init->ring_size / sizeof(u32));
dev_priv->ring.size = init->ring_size;
- dev_priv->ring.size_l2qw = DRM(order)( init->ring_size / 8 );
+ dev_priv->ring.size_l2qw = drm_order( init->ring_size / 8 );
dev_priv->ring.tail_mask =
(dev_priv->ring.size / sizeof(u32)) - 1;
@@ -1230,7 +1229,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init )
} else
#endif
{
- if (!DRM(ati_pcigart_init)( dev, &dev_priv->phys_pci_gart,
+ if (!drm_ati_pcigart_init( dev, &dev_priv->phys_pci_gart,
&dev_priv->bus_pci_gart)) {
DRM_ERROR( "failed to init PCI GART!\n" );
radeon_do_cleanup_cp(dev);
@@ -1260,7 +1259,7 @@ int radeon_do_cleanup_cp( drm_device_t *dev )
* 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);
+ if ( dev->irq_enabled ) drm_irq_uninstall(dev);
#if __OS_HAS_AGP
if (dev_priv->flags & CHIP_IS_AGP) {
@@ -1279,7 +1278,7 @@ int radeon_do_cleanup_cp( drm_device_t *dev )
} else
#endif
{
- if (!DRM(ati_pcigart_cleanup)( dev,
+ if (!drm_ati_pcigart_cleanup( dev,
dev_priv->phys_pci_gart,
dev_priv->bus_pci_gart ))
DRM_ERROR( "failed to cleanup PCI GART!\n" );
@@ -1734,7 +1733,7 @@ int radeon_preinit( struct drm_device *dev, unsigned long flags )
drm_radeon_private_t *dev_priv;
int ret = 0;
- dev_priv = DRM(alloc)( sizeof(drm_radeon_private_t), DRM_MEM_DRIVER );
+ dev_priv = drm_alloc( sizeof(drm_radeon_private_t), DRM_MEM_DRIVER );
if ( dev_priv == NULL )
return DRM_ERR(ENOMEM);
@@ -1743,12 +1742,12 @@ int radeon_preinit( struct drm_device *dev, unsigned long flags )
dev_priv->flags = flags;
/* registers */
- if( (ret = DRM(initmap)( dev, pci_resource_start( dev->pdev, 2 ),
+ if( (ret = drm_initmap( dev, pci_resource_start( dev->pdev, 2 ),
pci_resource_len( dev->pdev, 2 ), _DRM_REGISTERS, 0 )))
return ret;
/* framebuffer */
- if( (ret = DRM(initmap)( dev, pci_resource_start( dev->pdev, 0 ),
+ if( (ret = drm_initmap( dev, pci_resource_start( dev->pdev, 0 ),
pci_resource_len( dev->pdev, 0 ), _DRM_FRAME_BUFFER, _DRM_WRITE_COMBINING )))
return ret;
@@ -1776,11 +1775,6 @@ int radeon_preinit( struct drm_device *dev, unsigned long flags )
return ret;
}
-int radeon_postinit( struct drm_device *dev, unsigned long flags )
-{
- return 0;
-}
-
int radeon_postcleanup( struct drm_device *dev )
{
drm_radeon_private_t *dev_priv = dev->dev_private;
@@ -1789,7 +1783,7 @@ int radeon_postcleanup( struct drm_device *dev )
#if defined(__linux__)
radeon_delete_i2c_busses(dev);
#endif
- DRM(free)( dev_priv, sizeof(*dev_priv), DRM_MEM_DRIVER );
+ drm_free( dev_priv, sizeof(*dev_priv), DRM_MEM_DRIVER );
dev->dev_private = NULL;
return 0;