diff options
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/i915_dma.c | 8 | ||||
-rw-r--r-- | shared-core/mach64_dma.c | 19 | ||||
-rw-r--r-- | shared-core/mga_dma.c | 23 | ||||
-rw-r--r-- | shared-core/r128_cce.c | 23 | ||||
-rw-r--r-- | shared-core/radeon_cp.c | 22 | ||||
-rw-r--r-- | shared-core/via_map.c | 4 |
6 files changed, 48 insertions, 51 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index ec3e19a1..72573cbb 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -94,7 +94,7 @@ int i915_dma_cleanup(drm_device_t *dev) (drm_i915_private_t *) dev->dev_private; if (dev_priv->ring.virtual_start) { - DRM_IOREMAPFREE( &dev_priv->ring.map, dev); + drm_core_ioremapfree( &dev_priv->ring.map, dev); } if (dev_priv->hw_status_page) { @@ -135,8 +135,8 @@ static int i915_initialize(drm_device_t *dev, i915_dma_cleanup(dev); return DRM_ERR(EINVAL); } - - DRM_FIND_MAP( dev_priv->mmio_map, init->mmio_offset ); + + dev_priv->mmio_map = drm_core_findmap(dev, init->mmio_offset); if(!dev_priv->mmio_map) { dev->dev_private = (void *)dev_priv; i915_dma_cleanup(dev); @@ -159,7 +159,7 @@ static int i915_initialize(drm_device_t *dev, dev_priv->ring.map.flags = 0; dev_priv->ring.map.mtrr = 0; - DRM_IOREMAP( &dev_priv->ring.map, dev ); + drm_core_ioremap( &dev_priv->ring.map, dev ); if (dev_priv->ring.map.handle == NULL) { dev->dev_private = (void *) dev_priv; diff --git a/shared-core/mach64_dma.c b/shared-core/mach64_dma.c index bafbdc40..0acb784d 100644 --- a/shared-core/mach64_dma.c +++ b/shared-core/mach64_dma.c @@ -655,14 +655,14 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init ) mach64_do_cleanup_dma(dev); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->fb, init->fb_offset ); + dev_priv->fb = drm_core_findmap(dev, init->fb_offset); if (!dev_priv->fb) { DRM_ERROR("can not find frame buffer map!\n"); dev->dev_private = (void *)dev_priv; mach64_do_cleanup_dma(dev); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->mmio, init->mmio_offset ); + dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); if (!dev_priv->mmio) { DRM_ERROR("can not find mmio map!\n"); dev->dev_private = (void *)dev_priv; @@ -675,14 +675,14 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init ) init->sarea_priv_offset); if( !dev_priv->is_pci ) { - DRM_FIND_MAP( dev_priv->ring_map, init->ring_offset ); + dev_priv->ring_map = drm_core_findmap(dev, init->ring_offset); if ( !dev_priv->ring_map ) { DRM_ERROR( "can not find ring map!\n" ); dev->dev_private = (void *)dev_priv; mach64_do_cleanup_dma(dev); return DRM_ERR(EINVAL); } - DRM_IOREMAP( dev_priv->ring_map, dev ); + drm_core_ioremap( dev_priv->ring_map, dev ); if ( !dev_priv->ring_map->handle ) { DRM_ERROR( "can not ioremap virtual address for" " descriptor ring\n" ); @@ -690,7 +690,7 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init ) mach64_do_cleanup_dma( dev ); return DRM_ERR(ENOMEM); } - DRM_FIND_MAP( dev->agp_buffer_map, init->buffers_offset ); + dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); if ( !dev->agp_buffer_map ) { DRM_ERROR( "can not find dma buffer map!\n" ); dev->dev_private = (void *)dev_priv; @@ -701,7 +701,7 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init ) dev isn't passed all the way though the mach64 - DA */ dev_priv->dev_buffers = dev->agp_buffer_map; - DRM_IOREMAP( dev->agp_buffer_map, dev ); + drm_core_ioremap( dev->agp_buffer_map, dev ); if ( !dev->agp_buffer_map->handle ) { DRM_ERROR( "can not ioremap virtual address for" " dma buffer\n" ); @@ -709,8 +709,7 @@ static int mach64_do_dma_init( drm_device_t *dev, drm_mach64_init_t *init ) mach64_do_cleanup_dma( dev ); return DRM_ERR(ENOMEM); } - DRM_FIND_MAP( dev_priv->agp_textures, - init->agp_textures_offset ); + dev_priv->agp_textures = drm_core_findmap(dev, init->agp_textures_offset); if (!dev_priv->agp_textures) { DRM_ERROR( "can not find agp texture region!\n" ); dev->dev_private = (void *)dev_priv; @@ -991,11 +990,11 @@ int mach64_do_cleanup_dma( drm_device_t *dev ) } } else { if ( dev_priv->ring_map ) - DRM_IOREMAPFREE( dev_priv->ring_map, dev ); + drm_core_ioremapfree( dev_priv->ring_map, dev ); } if ( dev->agp_buffer_map ) - DRM_IOREMAPFREE( dev->agp_buffer_map, dev ); + drm_core_ioremapfree( dev->agp_buffer_map, dev ); mach64_destroy_freelist( dev ); diff --git a/shared-core/mga_dma.c b/shared-core/mga_dma.c index 7854a1d2..4a38b7d9 100644 --- a/shared-core/mga_dma.c +++ b/shared-core/mga_dma.c @@ -500,7 +500,7 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init ) return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->mmio, init->mmio_offset ); + dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); if(!dev_priv->mmio) { DRM_ERROR( "failed to find mmio region!\n" ); /* Assign dev_private so we can do cleanup. */ @@ -508,7 +508,7 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init ) mga_do_cleanup_dma( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->status, init->status_offset ); + dev_priv->status = drm_core_findmap(dev, init->status_offset); if(!dev_priv->status) { DRM_ERROR( "failed to find status page!\n" ); /* Assign dev_private so we can do cleanup. */ @@ -516,8 +516,7 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init ) mga_do_cleanup_dma( dev ); return DRM_ERR(EINVAL); } - - DRM_FIND_MAP( dev_priv->warp, init->warp_offset ); + dev_priv->warp = drm_core_findmap(dev, init->warp_offset); if(!dev_priv->warp) { DRM_ERROR( "failed to find warp microcode region!\n" ); /* Assign dev_private so we can do cleanup. */ @@ -525,7 +524,7 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init ) mga_do_cleanup_dma( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->primary, init->primary_offset ); + dev_priv->primary = drm_core_findmap(dev, init->primary_offset); if(!dev_priv->primary) { DRM_ERROR( "failed to find primary dma region!\n" ); /* Assign dev_private so we can do cleanup. */ @@ -533,7 +532,7 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init ) mga_do_cleanup_dma( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev->agp_buffer_map, init->buffers_offset ); + dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); if(!dev->agp_buffer_map) { DRM_ERROR( "failed to find dma buffer region!\n" ); /* Assign dev_private so we can do cleanup. */ @@ -546,9 +545,9 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init ) (drm_mga_sarea_t *)((u8 *)dev_priv->sarea->handle + init->sarea_priv_offset); - DRM_IOREMAP( dev_priv->warp, dev ); - DRM_IOREMAP( dev_priv->primary, dev ); - DRM_IOREMAP( dev->agp_buffer_map, dev ); + drm_core_ioremap( dev_priv->warp, dev ); + drm_core_ioremap( dev_priv->primary, dev ); + drm_core_ioremap( dev->agp_buffer_map, dev ); if(!dev_priv->warp->handle || !dev_priv->primary->handle || @@ -643,11 +642,11 @@ int mga_do_cleanup_dma( drm_device_t *dev ) drm_mga_private_t *dev_priv = dev->dev_private; if ( dev_priv->warp != NULL ) - DRM_IOREMAPFREE( dev_priv->warp, dev ); + drm_core_ioremapfree( dev_priv->warp, dev ); if ( dev_priv->primary != NULL ) - DRM_IOREMAPFREE( dev_priv->primary, dev ); + drm_core_ioremapfree( dev_priv->primary, dev ); if ( dev->agp_buffer_map != NULL ) - DRM_IOREMAPFREE( dev->agp_buffer_map, dev ); + drm_core_ioremapfree( dev->agp_buffer_map, dev ); if ( dev_priv->head != NULL ) { mga_freelist_cleanup( dev ); diff --git a/shared-core/r128_cce.c b/shared-core/r128_cce.c index 83612e57..43fa9b51 100644 --- a/shared-core/r128_cce.c +++ b/shared-core/r128_cce.c @@ -467,28 +467,28 @@ static int r128_do_init_cce( drm_device_t *dev, drm_r128_init_t *init ) return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->mmio, init->mmio_offset ); + dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); if(!dev_priv->mmio) { DRM_ERROR("could not find mmio region!\n"); dev->dev_private = (void *)dev_priv; r128_do_cleanup_cce( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->cce_ring, init->ring_offset ); + dev_priv->cce_ring = drm_core_findmap(dev, init->ring_offset); if(!dev_priv->cce_ring) { DRM_ERROR("could not find cce ring region!\n"); dev->dev_private = (void *)dev_priv; r128_do_cleanup_cce( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->ring_rptr, init->ring_rptr_offset ); + dev_priv->ring_rptr = drm_core_findmap(dev, init->ring_rptr_offset); if(!dev_priv->ring_rptr) { DRM_ERROR("could not find ring read pointer!\n"); dev->dev_private = (void *)dev_priv; r128_do_cleanup_cce( dev ); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev->agp_buffer_map, init->buffers_offset ); + dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); if(!dev->agp_buffer_map) { DRM_ERROR("could not find dma buffer region!\n"); dev->dev_private = (void *)dev_priv; @@ -497,8 +497,7 @@ static int r128_do_init_cce( drm_device_t *dev, drm_r128_init_t *init ) } if ( !dev_priv->is_pci ) { - DRM_FIND_MAP( dev_priv->agp_textures, - init->agp_textures_offset ); + dev_priv->agp_textures = drm_core_findmap(dev, init->agp_textures_offset); if(!dev_priv->agp_textures) { DRM_ERROR("could not find agp texture region!\n"); dev->dev_private = (void *)dev_priv; @@ -513,9 +512,9 @@ static int r128_do_init_cce( drm_device_t *dev, drm_r128_init_t *init ) #if __REALLY_HAVE_AGP if ( !dev_priv->is_pci ) { - DRM_IOREMAP( dev_priv->cce_ring, dev ); - DRM_IOREMAP( dev_priv->ring_rptr, dev ); - DRM_IOREMAP( dev->agp_buffer_map, dev ); + drm_core_ioremap( dev_priv->cce_ring, dev ); + drm_core_ioremap( dev_priv->ring_rptr, dev ); + drm_core_ioremap( dev->agp_buffer_map, dev ); if(!dev_priv->cce_ring->handle || !dev_priv->ring_rptr->handle || !dev->agp_buffer_map->handle) { @@ -601,11 +600,11 @@ int r128_do_cleanup_cce( drm_device_t *dev ) #if __REALLY_HAVE_AGP if ( !dev_priv->is_pci ) { if ( dev_priv->cce_ring != NULL ) - DRM_IOREMAPFREE( dev_priv->cce_ring, dev ); + drm_core_ioremapfree( dev_priv->cce_ring, dev ); if ( dev_priv->ring_rptr != NULL ) - DRM_IOREMAPFREE( dev_priv->ring_rptr, dev ); + drm_core_ioremapfree( dev_priv->ring_rptr, dev ); if ( dev->agp_buffer_map != NULL ) - DRM_IOREMAPFREE( dev->agp_buffer_map, dev ); + drm_core_ioremapfree( dev->agp_buffer_map, dev ); } else #endif { diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c index 1c172b28..fc859825 100644 --- a/shared-core/radeon_cp.c +++ b/shared-core/radeon_cp.c @@ -1118,28 +1118,28 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->mmio, init->mmio_offset ); + dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); if(!dev_priv->mmio) { DRM_ERROR("could not find mmio region!\n"); dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->cp_ring, init->ring_offset ); + dev_priv->cp_ring = drm_core_findmap(dev, init->ring_offset); if(!dev_priv->cp_ring) { DRM_ERROR("could not find cp ring region!\n"); dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev_priv->ring_rptr, init->ring_rptr_offset ); + dev_priv->ring_rptr = drm_core_findmap(dev, init->ring_rptr_offset); if(!dev_priv->ring_rptr) { DRM_ERROR("could not find ring read pointer!\n"); dev->dev_private = (void *)dev_priv; radeon_do_cleanup_cp(dev); return DRM_ERR(EINVAL); } - DRM_FIND_MAP( dev->agp_buffer_map, init->buffers_offset ); + dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); if(!dev->agp_buffer_map) { DRM_ERROR("could not find dma buffer region!\n"); dev->dev_private = (void *)dev_priv; @@ -1148,7 +1148,7 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) } if ( init->gart_textures_offset ) { - DRM_FIND_MAP( dev_priv->gart_textures, init->gart_textures_offset ); + dev_priv->gart_textures = drm_core_findmap(dev, init->gart_textures_offset); if ( !dev_priv->gart_textures ) { DRM_ERROR("could not find GART texture region!\n"); dev->dev_private = (void *)dev_priv; @@ -1163,9 +1163,9 @@ static int radeon_do_init_cp( drm_device_t *dev, drm_radeon_init_t *init ) #if __REALLY_HAVE_AGP if ( !dev_priv->is_pci ) { - DRM_IOREMAP( dev_priv->cp_ring, dev ); - DRM_IOREMAP( dev_priv->ring_rptr, dev ); - DRM_IOREMAP( dev->agp_buffer_map, dev ); + drm_core_ioremap( dev_priv->cp_ring, dev ); + drm_core_ioremap( dev_priv->ring_rptr, dev ); + drm_core_ioremap( dev->agp_buffer_map, dev ); if(!dev_priv->cp_ring->handle || !dev_priv->ring_rptr->handle || !dev->agp_buffer_map->handle) { @@ -1289,11 +1289,11 @@ int radeon_do_cleanup_cp( drm_device_t *dev ) #if __REALLY_HAVE_AGP if ( !dev_priv->is_pci ) { if ( dev_priv->cp_ring != NULL ) - DRM_IOREMAPFREE( dev_priv->cp_ring, dev ); + drm_core_ioremapfree( dev_priv->cp_ring, dev ); if ( dev_priv->ring_rptr != NULL ) - DRM_IOREMAPFREE( dev_priv->ring_rptr, dev ); + drm_core_ioremapfree( dev_priv->ring_rptr, dev ); if ( dev->agp_buffer_map != NULL ) - DRM_IOREMAPFREE( dev->agp_buffer_map, dev ); + drm_core_ioremapfree( dev->agp_buffer_map, dev ); } else #endif { diff --git a/shared-core/via_map.c b/shared-core/via_map.c index 53260927..afafadf1 100644 --- a/shared-core/via_map.c +++ b/shared-core/via_map.c @@ -47,14 +47,14 @@ int via_do_init_map(drm_device_t *dev, drm_via_init_t *init) return -EINVAL; } - DRM_FIND_MAP(dev_priv->fb, init->fb_offset); + dev_priv->fb = drm_core_findmap(dev, init->fb_offset); if (!dev_priv->fb) { DRM_ERROR("could not find framebuffer!\n"); dev->dev_private = (void *)dev_priv; via_do_cleanup_map(dev); return -EINVAL; } - DRM_FIND_MAP(dev_priv->mmio, init->mmio_offset); + dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); if (!dev_priv->mmio) { DRM_ERROR("could not find mmio region!\n"); dev->dev_private = (void *)dev_priv; |