diff options
author | Jon Smirl <jonsmirl@yahoo.com> | 2004-09-27 19:51:38 +0000 |
---|---|---|
committer | Jon Smirl <jonsmirl@yahoo.com> | 2004-09-27 19:51:38 +0000 |
commit | fa6b1d129e7bf8acf41e66c9c665ae9f9c1d5b0d (patch) | |
tree | c0b8605f134c4fe96a78f5b30644d25ac5ebcdf9 /linux-core/savage_dma.c | |
parent | 77fa7b9548bf7a5bf5e49515f1a478c27ede07a7 (diff) |
First check in for DRM that splits core from personality modules
Diffstat (limited to 'linux-core/savage_dma.c')
-rw-r--r-- | linux-core/savage_dma.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/linux-core/savage_dma.c b/linux-core/savage_dma.c index 581d4302..401fd942 100644 --- a/linux-core/savage_dma.c +++ b/linux-core/savage_dma.c @@ -24,7 +24,6 @@ /*=========================================================*/ -#include "savage.h" #include "drmP.h" #include "savage_drm.h" #include "savage_drv.h" @@ -35,13 +34,13 @@ #define SAVAGE_DEFAULT_USEC_TIMEOUT 10000 #define SAVAGE_FREELIST_DEBUG 0 -static int savage_preinit( drm_device_t *dev, unsigned long chipset ) +int savage_preinit( drm_device_t *dev, unsigned long chipset ) { drm_savage_private_t *dev_priv; unsigned mmioBase, fbBase, fbSize, apertureBase; int ret = 0; - dev_priv = DRM(alloc)( sizeof(drm_savage_private_t), DRM_MEM_DRIVER ); + dev_priv = drm_alloc( sizeof(drm_savage_private_t), DRM_MEM_DRIVER ); if ( dev_priv == NULL ) return DRM_ERR(ENOMEM); @@ -66,23 +65,17 @@ static int savage_preinit( drm_device_t *dev, unsigned long chipset ) apertureBase = pci_resource_start( dev->pdev, 2 ); } - if( (ret = DRM(initmap)( dev, mmioBase, SAVAGE_MMIO_SIZE, + if( (ret = drm_initmap( dev, mmioBase, SAVAGE_MMIO_SIZE, _DRM_REGISTERS, 0 ))) return ret; - if( (ret = DRM(initmap)( dev, fbBase, fbSize, + if( (ret = drm_initmap( dev, fbBase, fbSize, _DRM_FRAME_BUFFER, _DRM_WRITE_COMBINING ))) return ret; - if( (ret = DRM(initmap)( dev, apertureBase, SAVAGE_APERTURE_SIZE, + if( (ret = drm_initmap( dev, apertureBase, SAVAGE_APERTURE_SIZE, _DRM_FRAME_BUFFER, _DRM_WRITE_COMBINING ))) return ret; return ret; } - -void DRM(driver_register_fns)(drm_device_t *dev) -{ - dev->driver_features = DRIVER_USE_AGP | DRIVER_USE_MTRR; - dev->fn_tbl.preinit = savage_preinit; -} |