diff options
-rw-r--r-- | drivers/gpu/drm/drm_memory.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/i810/i810_dma.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/mga/mga_dma.c | 28 | ||||
-rw-r--r-- | drivers/gpu/drm/r128/r128_cce.c | 22 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_cp.c | 24 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cp.c | 24 | ||||
-rw-r--r-- | drivers/gpu/drm/savage/savage_bci.c | 16 | ||||
-rw-r--r-- | drivers/gpu/drm/via/via_dma.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/via/via_map.c | 4 | ||||
-rw-r--r-- | include/drm/drmP.h | 18 | ||||
-rw-r--r-- | include/drm/drm_legacy.h | 15 |
11 files changed, 88 insertions, 91 deletions
diff --git a/drivers/gpu/drm/drm_memory.c b/drivers/gpu/drm/drm_memory.c index 62fda6aaad90..a521ef6ff807 100644 --- a/drivers/gpu/drm/drm_memory.c +++ b/drivers/gpu/drm/drm_memory.c | |||
@@ -120,25 +120,25 @@ static inline void *agp_remap(unsigned long offset, unsigned long size, | |||
120 | 120 | ||
121 | #endif /* agp */ | 121 | #endif /* agp */ |
122 | 122 | ||
123 | void drm_core_ioremap(struct drm_local_map *map, struct drm_device *dev) | 123 | void drm_legacy_ioremap(struct drm_local_map *map, struct drm_device *dev) |
124 | { | 124 | { |
125 | if (dev->agp && dev->agp->cant_use_aperture && map->type == _DRM_AGP) | 125 | if (dev->agp && dev->agp->cant_use_aperture && map->type == _DRM_AGP) |
126 | map->handle = agp_remap(map->offset, map->size, dev); | 126 | map->handle = agp_remap(map->offset, map->size, dev); |
127 | else | 127 | else |
128 | map->handle = ioremap(map->offset, map->size); | 128 | map->handle = ioremap(map->offset, map->size); |
129 | } | 129 | } |
130 | EXPORT_SYMBOL(drm_core_ioremap); | 130 | EXPORT_SYMBOL(drm_legacy_ioremap); |
131 | 131 | ||
132 | void drm_core_ioremap_wc(struct drm_local_map *map, struct drm_device *dev) | 132 | void drm_legacy_ioremap_wc(struct drm_local_map *map, struct drm_device *dev) |
133 | { | 133 | { |
134 | if (dev->agp && dev->agp->cant_use_aperture && map->type == _DRM_AGP) | 134 | if (dev->agp && dev->agp->cant_use_aperture && map->type == _DRM_AGP) |
135 | map->handle = agp_remap(map->offset, map->size, dev); | 135 | map->handle = agp_remap(map->offset, map->size, dev); |
136 | else | 136 | else |
137 | map->handle = ioremap_wc(map->offset, map->size); | 137 | map->handle = ioremap_wc(map->offset, map->size); |
138 | } | 138 | } |
139 | EXPORT_SYMBOL(drm_core_ioremap_wc); | 139 | EXPORT_SYMBOL(drm_legacy_ioremap_wc); |
140 | 140 | ||
141 | void drm_core_ioremapfree(struct drm_local_map *map, struct drm_device *dev) | 141 | void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev) |
142 | { | 142 | { |
143 | if (!map->handle || !map->size) | 143 | if (!map->handle || !map->size) |
144 | return; | 144 | return; |
@@ -148,4 +148,4 @@ void drm_core_ioremapfree(struct drm_local_map *map, struct drm_device *dev) | |||
148 | else | 148 | else |
149 | iounmap(map->handle); | 149 | iounmap(map->handle); |
150 | } | 150 | } |
151 | EXPORT_SYMBOL(drm_core_ioremapfree); | 151 | EXPORT_SYMBOL(drm_legacy_ioremapfree); |
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c index c97e2ff6a35a..d91856779beb 100644 --- a/drivers/gpu/drm/i810/i810_dma.c +++ b/drivers/gpu/drm/i810/i810_dma.c | |||
@@ -213,7 +213,7 @@ static int i810_dma_cleanup(struct drm_device *dev) | |||
213 | (drm_i810_private_t *) dev->dev_private; | 213 | (drm_i810_private_t *) dev->dev_private; |
214 | 214 | ||
215 | if (dev_priv->ring.virtual_start) | 215 | if (dev_priv->ring.virtual_start) |
216 | drm_core_ioremapfree(&dev_priv->ring.map, dev); | 216 | drm_legacy_ioremapfree(&dev_priv->ring.map, dev); |
217 | if (dev_priv->hw_status_page) { | 217 | if (dev_priv->hw_status_page) { |
218 | pci_free_consistent(dev->pdev, PAGE_SIZE, | 218 | pci_free_consistent(dev->pdev, PAGE_SIZE, |
219 | dev_priv->hw_status_page, | 219 | dev_priv->hw_status_page, |
@@ -227,7 +227,7 @@ static int i810_dma_cleanup(struct drm_device *dev) | |||
227 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; | 227 | drm_i810_buf_priv_t *buf_priv = buf->dev_private; |
228 | 228 | ||
229 | if (buf_priv->kernel_virtual && buf->total) | 229 | if (buf_priv->kernel_virtual && buf->total) |
230 | drm_core_ioremapfree(&buf_priv->map, dev); | 230 | drm_legacy_ioremapfree(&buf_priv->map, dev); |
231 | } | 231 | } |
232 | } | 232 | } |
233 | return 0; | 233 | return 0; |
@@ -306,7 +306,7 @@ static int i810_freelist_init(struct drm_device *dev, drm_i810_private_t *dev_pr | |||
306 | buf_priv->map.flags = 0; | 306 | buf_priv->map.flags = 0; |
307 | buf_priv->map.mtrr = 0; | 307 | buf_priv->map.mtrr = 0; |
308 | 308 | ||
309 | drm_core_ioremap(&buf_priv->map, dev); | 309 | drm_legacy_ioremap(&buf_priv->map, dev); |
310 | buf_priv->kernel_virtual = buf_priv->map.handle; | 310 | buf_priv->kernel_virtual = buf_priv->map.handle; |
311 | 311 | ||
312 | } | 312 | } |
@@ -334,7 +334,7 @@ static int i810_dma_initialize(struct drm_device *dev, | |||
334 | DRM_ERROR("can not find sarea!\n"); | 334 | DRM_ERROR("can not find sarea!\n"); |
335 | return -EINVAL; | 335 | return -EINVAL; |
336 | } | 336 | } |
337 | dev_priv->mmio_map = drm_core_findmap(dev, init->mmio_offset); | 337 | dev_priv->mmio_map = drm_legacy_findmap(dev, init->mmio_offset); |
338 | if (!dev_priv->mmio_map) { | 338 | if (!dev_priv->mmio_map) { |
339 | dev->dev_private = (void *)dev_priv; | 339 | dev->dev_private = (void *)dev_priv; |
340 | i810_dma_cleanup(dev); | 340 | i810_dma_cleanup(dev); |
@@ -342,7 +342,7 @@ static int i810_dma_initialize(struct drm_device *dev, | |||
342 | return -EINVAL; | 342 | return -EINVAL; |
343 | } | 343 | } |
344 | dev->agp_buffer_token = init->buffers_offset; | 344 | dev->agp_buffer_token = init->buffers_offset; |
345 | dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); | 345 | dev->agp_buffer_map = drm_legacy_findmap(dev, init->buffers_offset); |
346 | if (!dev->agp_buffer_map) { | 346 | if (!dev->agp_buffer_map) { |
347 | dev->dev_private = (void *)dev_priv; | 347 | dev->dev_private = (void *)dev_priv; |
348 | i810_dma_cleanup(dev); | 348 | i810_dma_cleanup(dev); |
@@ -363,7 +363,7 @@ static int i810_dma_initialize(struct drm_device *dev, | |||
363 | dev_priv->ring.map.flags = 0; | 363 | dev_priv->ring.map.flags = 0; |
364 | dev_priv->ring.map.mtrr = 0; | 364 | dev_priv->ring.map.mtrr = 0; |
365 | 365 | ||
366 | drm_core_ioremap(&dev_priv->ring.map, dev); | 366 | drm_legacy_ioremap(&dev_priv->ring.map, dev); |
367 | 367 | ||
368 | if (dev_priv->ring.map.handle == NULL) { | 368 | if (dev_priv->ring.map.handle == NULL) { |
369 | dev->dev_private = (void *)dev_priv; | 369 | dev->dev_private = (void *)dev_priv; |
diff --git a/drivers/gpu/drm/mga/mga_dma.c b/drivers/gpu/drm/mga/mga_dma.c index 37d80c122483..8cfa9cb74c86 100644 --- a/drivers/gpu/drm/mga/mga_dma.c +++ b/drivers/gpu/drm/mga/mga_dma.c | |||
@@ -566,9 +566,9 @@ static int mga_do_agp_dma_bootstrap(struct drm_device *dev, | |||
566 | return err; | 566 | return err; |
567 | } | 567 | } |
568 | 568 | ||
569 | drm_core_ioremap(dev_priv->warp, dev); | 569 | drm_legacy_ioremap(dev_priv->warp, dev); |
570 | drm_core_ioremap(dev_priv->primary, dev); | 570 | drm_legacy_ioremap(dev_priv->primary, dev); |
571 | drm_core_ioremap(dev->agp_buffer_map, dev); | 571 | drm_legacy_ioremap(dev->agp_buffer_map, dev); |
572 | 572 | ||
573 | if (!dev_priv->warp->handle || | 573 | if (!dev_priv->warp->handle || |
574 | !dev_priv->primary->handle || !dev->agp_buffer_map->handle) { | 574 | !dev_priv->primary->handle || !dev->agp_buffer_map->handle) { |
@@ -821,37 +821,37 @@ static int mga_do_init_dma(struct drm_device *dev, drm_mga_init_t *init) | |||
821 | dev_priv->dma_access = MGA_PAGPXFER; | 821 | dev_priv->dma_access = MGA_PAGPXFER; |
822 | dev_priv->wagp_enable = MGA_WAGP_ENABLE; | 822 | dev_priv->wagp_enable = MGA_WAGP_ENABLE; |
823 | 823 | ||
824 | dev_priv->status = drm_core_findmap(dev, init->status_offset); | 824 | dev_priv->status = drm_legacy_findmap(dev, init->status_offset); |
825 | if (!dev_priv->status) { | 825 | if (!dev_priv->status) { |
826 | DRM_ERROR("failed to find status page!\n"); | 826 | DRM_ERROR("failed to find status page!\n"); |
827 | return -EINVAL; | 827 | return -EINVAL; |
828 | } | 828 | } |
829 | dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); | 829 | dev_priv->mmio = drm_legacy_findmap(dev, init->mmio_offset); |
830 | if (!dev_priv->mmio) { | 830 | if (!dev_priv->mmio) { |
831 | DRM_ERROR("failed to find mmio region!\n"); | 831 | DRM_ERROR("failed to find mmio region!\n"); |
832 | return -EINVAL; | 832 | return -EINVAL; |
833 | } | 833 | } |
834 | dev_priv->warp = drm_core_findmap(dev, init->warp_offset); | 834 | dev_priv->warp = drm_legacy_findmap(dev, init->warp_offset); |
835 | if (!dev_priv->warp) { | 835 | if (!dev_priv->warp) { |
836 | DRM_ERROR("failed to find warp microcode region!\n"); | 836 | DRM_ERROR("failed to find warp microcode region!\n"); |
837 | return -EINVAL; | 837 | return -EINVAL; |
838 | } | 838 | } |
839 | dev_priv->primary = drm_core_findmap(dev, init->primary_offset); | 839 | dev_priv->primary = drm_legacy_findmap(dev, init->primary_offset); |
840 | if (!dev_priv->primary) { | 840 | if (!dev_priv->primary) { |
841 | DRM_ERROR("failed to find primary dma region!\n"); | 841 | DRM_ERROR("failed to find primary dma region!\n"); |
842 | return -EINVAL; | 842 | return -EINVAL; |
843 | } | 843 | } |
844 | dev->agp_buffer_token = init->buffers_offset; | 844 | dev->agp_buffer_token = init->buffers_offset; |
845 | dev->agp_buffer_map = | 845 | dev->agp_buffer_map = |
846 | drm_core_findmap(dev, init->buffers_offset); | 846 | drm_legacy_findmap(dev, init->buffers_offset); |
847 | if (!dev->agp_buffer_map) { | 847 | if (!dev->agp_buffer_map) { |
848 | DRM_ERROR("failed to find dma buffer region!\n"); | 848 | DRM_ERROR("failed to find dma buffer region!\n"); |
849 | return -EINVAL; | 849 | return -EINVAL; |
850 | } | 850 | } |
851 | 851 | ||
852 | drm_core_ioremap(dev_priv->warp, dev); | 852 | drm_legacy_ioremap(dev_priv->warp, dev); |
853 | drm_core_ioremap(dev_priv->primary, dev); | 853 | drm_legacy_ioremap(dev_priv->primary, dev); |
854 | drm_core_ioremap(dev->agp_buffer_map, dev); | 854 | drm_legacy_ioremap(dev->agp_buffer_map, dev); |
855 | } | 855 | } |
856 | 856 | ||
857 | dev_priv->sarea_priv = | 857 | dev_priv->sarea_priv = |
@@ -937,14 +937,14 @@ static int mga_do_cleanup_dma(struct drm_device *dev, int full_cleanup) | |||
937 | 937 | ||
938 | if ((dev_priv->warp != NULL) | 938 | if ((dev_priv->warp != NULL) |
939 | && (dev_priv->warp->type != _DRM_CONSISTENT)) | 939 | && (dev_priv->warp->type != _DRM_CONSISTENT)) |
940 | drm_core_ioremapfree(dev_priv->warp, dev); | 940 | drm_legacy_ioremapfree(dev_priv->warp, dev); |
941 | 941 | ||
942 | if ((dev_priv->primary != NULL) | 942 | if ((dev_priv->primary != NULL) |
943 | && (dev_priv->primary->type != _DRM_CONSISTENT)) | 943 | && (dev_priv->primary->type != _DRM_CONSISTENT)) |
944 | drm_core_ioremapfree(dev_priv->primary, dev); | 944 | drm_legacy_ioremapfree(dev_priv->primary, dev); |
945 | 945 | ||
946 | if (dev->agp_buffer_map != NULL) | 946 | if (dev->agp_buffer_map != NULL) |
947 | drm_core_ioremapfree(dev->agp_buffer_map, dev); | 947 | drm_legacy_ioremapfree(dev->agp_buffer_map, dev); |
948 | 948 | ||
949 | if (dev_priv->used_new_dma_init) { | 949 | if (dev_priv->used_new_dma_init) { |
950 | #if __OS_HAS_AGP | 950 | #if __OS_HAS_AGP |
diff --git a/drivers/gpu/drm/r128/r128_cce.c b/drivers/gpu/drm/r128/r128_cce.c index 1fae2f706b01..2c45ac9c1dc3 100644 --- a/drivers/gpu/drm/r128/r128_cce.c +++ b/drivers/gpu/drm/r128/r128_cce.c | |||
@@ -460,21 +460,21 @@ static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init) | |||
460 | return -EINVAL; | 460 | return -EINVAL; |
461 | } | 461 | } |
462 | 462 | ||
463 | dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); | 463 | dev_priv->mmio = drm_legacy_findmap(dev, init->mmio_offset); |
464 | if (!dev_priv->mmio) { | 464 | if (!dev_priv->mmio) { |
465 | DRM_ERROR("could not find mmio region!\n"); | 465 | DRM_ERROR("could not find mmio region!\n"); |
466 | dev->dev_private = (void *)dev_priv; | 466 | dev->dev_private = (void *)dev_priv; |
467 | r128_do_cleanup_cce(dev); | 467 | r128_do_cleanup_cce(dev); |
468 | return -EINVAL; | 468 | return -EINVAL; |
469 | } | 469 | } |
470 | dev_priv->cce_ring = drm_core_findmap(dev, init->ring_offset); | 470 | dev_priv->cce_ring = drm_legacy_findmap(dev, init->ring_offset); |
471 | if (!dev_priv->cce_ring) { | 471 | if (!dev_priv->cce_ring) { |
472 | DRM_ERROR("could not find cce ring region!\n"); | 472 | DRM_ERROR("could not find cce ring region!\n"); |
473 | dev->dev_private = (void *)dev_priv; | 473 | dev->dev_private = (void *)dev_priv; |
474 | r128_do_cleanup_cce(dev); | 474 | r128_do_cleanup_cce(dev); |
475 | return -EINVAL; | 475 | return -EINVAL; |
476 | } | 476 | } |
477 | dev_priv->ring_rptr = drm_core_findmap(dev, init->ring_rptr_offset); | 477 | dev_priv->ring_rptr = drm_legacy_findmap(dev, init->ring_rptr_offset); |
478 | if (!dev_priv->ring_rptr) { | 478 | if (!dev_priv->ring_rptr) { |
479 | DRM_ERROR("could not find ring read pointer!\n"); | 479 | DRM_ERROR("could not find ring read pointer!\n"); |
480 | dev->dev_private = (void *)dev_priv; | 480 | dev->dev_private = (void *)dev_priv; |
@@ -482,7 +482,7 @@ static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init) | |||
482 | return -EINVAL; | 482 | return -EINVAL; |
483 | } | 483 | } |
484 | dev->agp_buffer_token = init->buffers_offset; | 484 | dev->agp_buffer_token = init->buffers_offset; |
485 | dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); | 485 | dev->agp_buffer_map = drm_legacy_findmap(dev, init->buffers_offset); |
486 | if (!dev->agp_buffer_map) { | 486 | if (!dev->agp_buffer_map) { |
487 | DRM_ERROR("could not find dma buffer region!\n"); | 487 | DRM_ERROR("could not find dma buffer region!\n"); |
488 | dev->dev_private = (void *)dev_priv; | 488 | dev->dev_private = (void *)dev_priv; |
@@ -492,7 +492,7 @@ static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init) | |||
492 | 492 | ||
493 | if (!dev_priv->is_pci) { | 493 | if (!dev_priv->is_pci) { |
494 | dev_priv->agp_textures = | 494 | dev_priv->agp_textures = |
495 | drm_core_findmap(dev, init->agp_textures_offset); | 495 | drm_legacy_findmap(dev, init->agp_textures_offset); |
496 | if (!dev_priv->agp_textures) { | 496 | if (!dev_priv->agp_textures) { |
497 | DRM_ERROR("could not find agp texture region!\n"); | 497 | DRM_ERROR("could not find agp texture region!\n"); |
498 | dev->dev_private = (void *)dev_priv; | 498 | dev->dev_private = (void *)dev_priv; |
@@ -507,9 +507,9 @@ static int r128_do_init_cce(struct drm_device *dev, drm_r128_init_t *init) | |||
507 | 507 | ||
508 | #if __OS_HAS_AGP | 508 | #if __OS_HAS_AGP |
509 | if (!dev_priv->is_pci) { | 509 | if (!dev_priv->is_pci) { |
510 | drm_core_ioremap_wc(dev_priv->cce_ring, dev); | 510 | drm_legacy_ioremap_wc(dev_priv->cce_ring, dev); |
511 | drm_core_ioremap_wc(dev_priv->ring_rptr, dev); | 511 | drm_legacy_ioremap_wc(dev_priv->ring_rptr, dev); |
512 | drm_core_ioremap_wc(dev->agp_buffer_map, dev); | 512 | drm_legacy_ioremap_wc(dev->agp_buffer_map, dev); |
513 | if (!dev_priv->cce_ring->handle || | 513 | if (!dev_priv->cce_ring->handle || |
514 | !dev_priv->ring_rptr->handle || | 514 | !dev_priv->ring_rptr->handle || |
515 | !dev->agp_buffer_map->handle) { | 515 | !dev->agp_buffer_map->handle) { |
@@ -603,11 +603,11 @@ int r128_do_cleanup_cce(struct drm_device *dev) | |||
603 | #if __OS_HAS_AGP | 603 | #if __OS_HAS_AGP |
604 | if (!dev_priv->is_pci) { | 604 | if (!dev_priv->is_pci) { |
605 | if (dev_priv->cce_ring != NULL) | 605 | if (dev_priv->cce_ring != NULL) |
606 | drm_core_ioremapfree(dev_priv->cce_ring, dev); | 606 | drm_legacy_ioremapfree(dev_priv->cce_ring, dev); |
607 | if (dev_priv->ring_rptr != NULL) | 607 | if (dev_priv->ring_rptr != NULL) |
608 | drm_core_ioremapfree(dev_priv->ring_rptr, dev); | 608 | drm_legacy_ioremapfree(dev_priv->ring_rptr, dev); |
609 | if (dev->agp_buffer_map != NULL) { | 609 | if (dev->agp_buffer_map != NULL) { |
610 | drm_core_ioremapfree(dev->agp_buffer_map, dev); | 610 | drm_legacy_ioremapfree(dev->agp_buffer_map, dev); |
611 | dev->agp_buffer_map = NULL; | 611 | dev->agp_buffer_map = NULL; |
612 | } | 612 | } |
613 | } else | 613 | } else |
diff --git a/drivers/gpu/drm/radeon/r600_cp.c b/drivers/gpu/drm/radeon/r600_cp.c index 639d6681ef5b..09e3f39925fa 100644 --- a/drivers/gpu/drm/radeon/r600_cp.c +++ b/drivers/gpu/drm/radeon/r600_cp.c | |||
@@ -1949,15 +1949,15 @@ int r600_do_cleanup_cp(struct drm_device *dev) | |||
1949 | #if __OS_HAS_AGP | 1949 | #if __OS_HAS_AGP |
1950 | if (dev_priv->flags & RADEON_IS_AGP) { | 1950 | if (dev_priv->flags & RADEON_IS_AGP) { |
1951 | if (dev_priv->cp_ring != NULL) { | 1951 | if (dev_priv->cp_ring != NULL) { |
1952 | drm_core_ioremapfree(dev_priv->cp_ring, dev); | 1952 | drm_legacy_ioremapfree(dev_priv->cp_ring, dev); |
1953 | dev_priv->cp_ring = NULL; | 1953 | dev_priv->cp_ring = NULL; |
1954 | } | 1954 | } |
1955 | if (dev_priv->ring_rptr != NULL) { | 1955 | if (dev_priv->ring_rptr != NULL) { |
1956 | drm_core_ioremapfree(dev_priv->ring_rptr, dev); | 1956 | drm_legacy_ioremapfree(dev_priv->ring_rptr, dev); |
1957 | dev_priv->ring_rptr = NULL; | 1957 | dev_priv->ring_rptr = NULL; |
1958 | } | 1958 | } |
1959 | if (dev->agp_buffer_map != NULL) { | 1959 | if (dev->agp_buffer_map != NULL) { |
1960 | drm_core_ioremapfree(dev->agp_buffer_map, dev); | 1960 | drm_legacy_ioremapfree(dev->agp_buffer_map, dev); |
1961 | dev->agp_buffer_map = NULL; | 1961 | dev->agp_buffer_map = NULL; |
1962 | } | 1962 | } |
1963 | } else | 1963 | } else |
@@ -1968,7 +1968,7 @@ int r600_do_cleanup_cp(struct drm_device *dev) | |||
1968 | r600_page_table_cleanup(dev, &dev_priv->gart_info); | 1968 | r600_page_table_cleanup(dev, &dev_priv->gart_info); |
1969 | 1969 | ||
1970 | if (dev_priv->gart_info.gart_table_location == DRM_ATI_GART_FB) { | 1970 | if (dev_priv->gart_info.gart_table_location == DRM_ATI_GART_FB) { |
1971 | drm_core_ioremapfree(&dev_priv->gart_info.mapping, dev); | 1971 | drm_legacy_ioremapfree(&dev_priv->gart_info.mapping, dev); |
1972 | dev_priv->gart_info.addr = NULL; | 1972 | dev_priv->gart_info.addr = NULL; |
1973 | } | 1973 | } |
1974 | } | 1974 | } |
@@ -2059,20 +2059,20 @@ int r600_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, | |||
2059 | return -EINVAL; | 2059 | return -EINVAL; |
2060 | } | 2060 | } |
2061 | 2061 | ||
2062 | dev_priv->cp_ring = drm_core_findmap(dev, init->ring_offset); | 2062 | dev_priv->cp_ring = drm_legacy_findmap(dev, init->ring_offset); |
2063 | if (!dev_priv->cp_ring) { | 2063 | if (!dev_priv->cp_ring) { |
2064 | DRM_ERROR("could not find cp ring region!\n"); | 2064 | DRM_ERROR("could not find cp ring region!\n"); |
2065 | r600_do_cleanup_cp(dev); | 2065 | r600_do_cleanup_cp(dev); |
2066 | return -EINVAL; | 2066 | return -EINVAL; |
2067 | } | 2067 | } |
2068 | dev_priv->ring_rptr = drm_core_findmap(dev, init->ring_rptr_offset); | 2068 | dev_priv->ring_rptr = drm_legacy_findmap(dev, init->ring_rptr_offset); |
2069 | if (!dev_priv->ring_rptr) { | 2069 | if (!dev_priv->ring_rptr) { |
2070 | DRM_ERROR("could not find ring read pointer!\n"); | 2070 | DRM_ERROR("could not find ring read pointer!\n"); |
2071 | r600_do_cleanup_cp(dev); | 2071 | r600_do_cleanup_cp(dev); |
2072 | return -EINVAL; | 2072 | return -EINVAL; |
2073 | } | 2073 | } |
2074 | dev->agp_buffer_token = init->buffers_offset; | 2074 | dev->agp_buffer_token = init->buffers_offset; |
2075 | dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); | 2075 | dev->agp_buffer_map = drm_legacy_findmap(dev, init->buffers_offset); |
2076 | if (!dev->agp_buffer_map) { | 2076 | if (!dev->agp_buffer_map) { |
2077 | DRM_ERROR("could not find dma buffer region!\n"); | 2077 | DRM_ERROR("could not find dma buffer region!\n"); |
2078 | r600_do_cleanup_cp(dev); | 2078 | r600_do_cleanup_cp(dev); |
@@ -2081,7 +2081,7 @@ int r600_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, | |||
2081 | 2081 | ||
2082 | if (init->gart_textures_offset) { | 2082 | if (init->gart_textures_offset) { |
2083 | dev_priv->gart_textures = | 2083 | dev_priv->gart_textures = |
2084 | drm_core_findmap(dev, init->gart_textures_offset); | 2084 | drm_legacy_findmap(dev, init->gart_textures_offset); |
2085 | if (!dev_priv->gart_textures) { | 2085 | if (!dev_priv->gart_textures) { |
2086 | DRM_ERROR("could not find GART texture region!\n"); | 2086 | DRM_ERROR("could not find GART texture region!\n"); |
2087 | r600_do_cleanup_cp(dev); | 2087 | r600_do_cleanup_cp(dev); |
@@ -2092,9 +2092,9 @@ int r600_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, | |||
2092 | #if __OS_HAS_AGP | 2092 | #if __OS_HAS_AGP |
2093 | /* XXX */ | 2093 | /* XXX */ |
2094 | if (dev_priv->flags & RADEON_IS_AGP) { | 2094 | if (dev_priv->flags & RADEON_IS_AGP) { |
2095 | drm_core_ioremap_wc(dev_priv->cp_ring, dev); | 2095 | drm_legacy_ioremap_wc(dev_priv->cp_ring, dev); |
2096 | drm_core_ioremap_wc(dev_priv->ring_rptr, dev); | 2096 | drm_legacy_ioremap_wc(dev_priv->ring_rptr, dev); |
2097 | drm_core_ioremap_wc(dev->agp_buffer_map, dev); | 2097 | drm_legacy_ioremap_wc(dev->agp_buffer_map, dev); |
2098 | if (!dev_priv->cp_ring->handle || | 2098 | if (!dev_priv->cp_ring->handle || |
2099 | !dev_priv->ring_rptr->handle || | 2099 | !dev_priv->ring_rptr->handle || |
2100 | !dev->agp_buffer_map->handle) { | 2100 | !dev->agp_buffer_map->handle) { |
@@ -2235,7 +2235,7 @@ int r600_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, | |||
2235 | dev_priv->gart_info.mapping.size = | 2235 | dev_priv->gart_info.mapping.size = |
2236 | dev_priv->gart_info.table_size; | 2236 | dev_priv->gart_info.table_size; |
2237 | 2237 | ||
2238 | drm_core_ioremap_wc(&dev_priv->gart_info.mapping, dev); | 2238 | drm_legacy_ioremap_wc(&dev_priv->gart_info.mapping, dev); |
2239 | if (!dev_priv->gart_info.mapping.handle) { | 2239 | if (!dev_priv->gart_info.mapping.handle) { |
2240 | DRM_ERROR("ioremap failed.\n"); | 2240 | DRM_ERROR("ioremap failed.\n"); |
2241 | r600_do_cleanup_cp(dev); | 2241 | r600_do_cleanup_cp(dev); |
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 0c388016eecb..ea134a7d51a5 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c | |||
@@ -1305,20 +1305,20 @@ static int radeon_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, | |||
1305 | return -EINVAL; | 1305 | return -EINVAL; |
1306 | } | 1306 | } |
1307 | 1307 | ||
1308 | dev_priv->cp_ring = drm_core_findmap(dev, init->ring_offset); | 1308 | dev_priv->cp_ring = drm_legacy_findmap(dev, init->ring_offset); |
1309 | if (!dev_priv->cp_ring) { | 1309 | if (!dev_priv->cp_ring) { |
1310 | DRM_ERROR("could not find cp ring region!\n"); | 1310 | DRM_ERROR("could not find cp ring region!\n"); |
1311 | radeon_do_cleanup_cp(dev); | 1311 | radeon_do_cleanup_cp(dev); |
1312 | return -EINVAL; | 1312 | return -EINVAL; |
1313 | } | 1313 | } |
1314 | dev_priv->ring_rptr = drm_core_findmap(dev, init->ring_rptr_offset); | 1314 | dev_priv->ring_rptr = drm_legacy_findmap(dev, init->ring_rptr_offset); |
1315 | if (!dev_priv->ring_rptr) { | 1315 | if (!dev_priv->ring_rptr) { |
1316 | DRM_ERROR("could not find ring read pointer!\n"); | 1316 | DRM_ERROR("could not find ring read pointer!\n"); |
1317 | radeon_do_cleanup_cp(dev); | 1317 | radeon_do_cleanup_cp(dev); |
1318 | return -EINVAL; | 1318 | return -EINVAL; |
1319 | } | 1319 | } |
1320 | dev->agp_buffer_token = init->buffers_offset; | 1320 | dev->agp_buffer_token = init->buffers_offset; |
1321 | dev->agp_buffer_map = drm_core_findmap(dev, init->buffers_offset); | 1321 | dev->agp_buffer_map = drm_legacy_findmap(dev, init->buffers_offset); |
1322 | if (!dev->agp_buffer_map) { | 1322 | if (!dev->agp_buffer_map) { |
1323 | DRM_ERROR("could not find dma buffer region!\n"); | 1323 | DRM_ERROR("could not find dma buffer region!\n"); |
1324 | radeon_do_cleanup_cp(dev); | 1324 | radeon_do_cleanup_cp(dev); |
@@ -1327,7 +1327,7 @@ static int radeon_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, | |||
1327 | 1327 | ||
1328 | if (init->gart_textures_offset) { | 1328 | if (init->gart_textures_offset) { |
1329 | dev_priv->gart_textures = | 1329 | dev_priv->gart_textures = |
1330 | drm_core_findmap(dev, init->gart_textures_offset); | 1330 | drm_legacy_findmap(dev, init->gart_textures_offset); |
1331 | if (!dev_priv->gart_textures) { | 1331 | if (!dev_priv->gart_textures) { |
1332 | DRM_ERROR("could not find GART texture region!\n"); | 1332 | DRM_ERROR("could not find GART texture region!\n"); |
1333 | radeon_do_cleanup_cp(dev); | 1333 | radeon_do_cleanup_cp(dev); |
@@ -1337,9 +1337,9 @@ static int radeon_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, | |||
1337 | 1337 | ||
1338 | #if __OS_HAS_AGP | 1338 | #if __OS_HAS_AGP |
1339 | if (dev_priv->flags & RADEON_IS_AGP) { | 1339 | if (dev_priv->flags & RADEON_IS_AGP) { |
1340 | drm_core_ioremap_wc(dev_priv->cp_ring, dev); | 1340 | drm_legacy_ioremap_wc(dev_priv->cp_ring, dev); |
1341 | drm_core_ioremap_wc(dev_priv->ring_rptr, dev); | 1341 | drm_legacy_ioremap_wc(dev_priv->ring_rptr, dev); |
1342 | drm_core_ioremap_wc(dev->agp_buffer_map, dev); | 1342 | drm_legacy_ioremap_wc(dev->agp_buffer_map, dev); |
1343 | if (!dev_priv->cp_ring->handle || | 1343 | if (!dev_priv->cp_ring->handle || |
1344 | !dev_priv->ring_rptr->handle || | 1344 | !dev_priv->ring_rptr->handle || |
1345 | !dev->agp_buffer_map->handle) { | 1345 | !dev->agp_buffer_map->handle) { |
@@ -1475,7 +1475,7 @@ static int radeon_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, | |||
1475 | dev_priv->gart_info.mapping.size = | 1475 | dev_priv->gart_info.mapping.size = |
1476 | dev_priv->gart_info.table_size; | 1476 | dev_priv->gart_info.table_size; |
1477 | 1477 | ||
1478 | drm_core_ioremap_wc(&dev_priv->gart_info.mapping, dev); | 1478 | drm_legacy_ioremap_wc(&dev_priv->gart_info.mapping, dev); |
1479 | dev_priv->gart_info.addr = | 1479 | dev_priv->gart_info.addr = |
1480 | dev_priv->gart_info.mapping.handle; | 1480 | dev_priv->gart_info.mapping.handle; |
1481 | 1481 | ||
@@ -1569,15 +1569,15 @@ static int radeon_do_cleanup_cp(struct drm_device * dev) | |||
1569 | #if __OS_HAS_AGP | 1569 | #if __OS_HAS_AGP |
1570 | if (dev_priv->flags & RADEON_IS_AGP) { | 1570 | if (dev_priv->flags & RADEON_IS_AGP) { |
1571 | if (dev_priv->cp_ring != NULL) { | 1571 | if (dev_priv->cp_ring != NULL) { |
1572 | drm_core_ioremapfree(dev_priv->cp_ring, dev); | 1572 | drm_legacy_ioremapfree(dev_priv->cp_ring, dev); |
1573 | dev_priv->cp_ring = NULL; | 1573 | dev_priv->cp_ring = NULL; |
1574 | } | 1574 | } |
1575 | if (dev_priv->ring_rptr != NULL) { | 1575 | if (dev_priv->ring_rptr != NULL) { |
1576 | drm_core_ioremapfree(dev_priv->ring_rptr, dev); | 1576 | drm_legacy_ioremapfree(dev_priv->ring_rptr, dev); |
1577 | dev_priv->ring_rptr = NULL; | 1577 | dev_priv->ring_rptr = NULL; |
1578 | } | 1578 | } |
1579 | if (dev->agp_buffer_map != NULL) { | 1579 | if (dev->agp_buffer_map != NULL) { |
1580 | drm_core_ioremapfree(dev->agp_buffer_map, dev); | 1580 | drm_legacy_ioremapfree(dev->agp_buffer_map, dev); |
1581 | dev->agp_buffer_map = NULL; | 1581 | dev->agp_buffer_map = NULL; |
1582 | } | 1582 | } |
1583 | } else | 1583 | } else |
@@ -1597,7 +1597,7 @@ static int radeon_do_cleanup_cp(struct drm_device * dev) | |||
1597 | 1597 | ||
1598 | if (dev_priv->gart_info.gart_table_location == DRM_ATI_GART_FB) | 1598 | if (dev_priv->gart_info.gart_table_location == DRM_ATI_GART_FB) |
1599 | { | 1599 | { |
1600 | drm_core_ioremapfree(&dev_priv->gart_info.mapping, dev); | 1600 | drm_legacy_ioremapfree(&dev_priv->gart_info.mapping, dev); |
1601 | dev_priv->gart_info.addr = NULL; | 1601 | dev_priv->gart_info.addr = NULL; |
1602 | } | 1602 | } |
1603 | } | 1603 | } |
diff --git a/drivers/gpu/drm/savage/savage_bci.c b/drivers/gpu/drm/savage/savage_bci.c index 9288d3037ce5..d47dff95fe52 100644 --- a/drivers/gpu/drm/savage/savage_bci.c +++ b/drivers/gpu/drm/savage/savage_bci.c | |||
@@ -706,7 +706,7 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init) | |||
706 | return -EINVAL; | 706 | return -EINVAL; |
707 | } | 707 | } |
708 | if (init->status_offset != 0) { | 708 | if (init->status_offset != 0) { |
709 | dev_priv->status = drm_core_findmap(dev, init->status_offset); | 709 | dev_priv->status = drm_legacy_findmap(dev, init->status_offset); |
710 | if (!dev_priv->status) { | 710 | if (!dev_priv->status) { |
711 | DRM_ERROR("could not find shadow status region!\n"); | 711 | DRM_ERROR("could not find shadow status region!\n"); |
712 | savage_do_cleanup_bci(dev); | 712 | savage_do_cleanup_bci(dev); |
@@ -717,14 +717,14 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init) | |||
717 | } | 717 | } |
718 | if (dev_priv->dma_type == SAVAGE_DMA_AGP && init->buffers_offset) { | 718 | if (dev_priv->dma_type == SAVAGE_DMA_AGP && init->buffers_offset) { |
719 | dev->agp_buffer_token = init->buffers_offset; | 719 | dev->agp_buffer_token = init->buffers_offset; |
720 | dev->agp_buffer_map = drm_core_findmap(dev, | 720 | dev->agp_buffer_map = drm_legacy_findmap(dev, |
721 | init->buffers_offset); | 721 | init->buffers_offset); |
722 | if (!dev->agp_buffer_map) { | 722 | if (!dev->agp_buffer_map) { |
723 | DRM_ERROR("could not find DMA buffer region!\n"); | 723 | DRM_ERROR("could not find DMA buffer region!\n"); |
724 | savage_do_cleanup_bci(dev); | 724 | savage_do_cleanup_bci(dev); |
725 | return -EINVAL; | 725 | return -EINVAL; |
726 | } | 726 | } |
727 | drm_core_ioremap(dev->agp_buffer_map, dev); | 727 | drm_legacy_ioremap(dev->agp_buffer_map, dev); |
728 | if (!dev->agp_buffer_map->handle) { | 728 | if (!dev->agp_buffer_map->handle) { |
729 | DRM_ERROR("failed to ioremap DMA buffer region!\n"); | 729 | DRM_ERROR("failed to ioremap DMA buffer region!\n"); |
730 | savage_do_cleanup_bci(dev); | 730 | savage_do_cleanup_bci(dev); |
@@ -733,7 +733,7 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init) | |||
733 | } | 733 | } |
734 | if (init->agp_textures_offset) { | 734 | if (init->agp_textures_offset) { |
735 | dev_priv->agp_textures = | 735 | dev_priv->agp_textures = |
736 | drm_core_findmap(dev, init->agp_textures_offset); | 736 | drm_legacy_findmap(dev, init->agp_textures_offset); |
737 | if (!dev_priv->agp_textures) { | 737 | if (!dev_priv->agp_textures) { |
738 | DRM_ERROR("could not find agp texture region!\n"); | 738 | DRM_ERROR("could not find agp texture region!\n"); |
739 | savage_do_cleanup_bci(dev); | 739 | savage_do_cleanup_bci(dev); |
@@ -756,7 +756,7 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init) | |||
756 | savage_do_cleanup_bci(dev); | 756 | savage_do_cleanup_bci(dev); |
757 | return -EINVAL; | 757 | return -EINVAL; |
758 | } | 758 | } |
759 | dev_priv->cmd_dma = drm_core_findmap(dev, init->cmd_dma_offset); | 759 | dev_priv->cmd_dma = drm_legacy_findmap(dev, init->cmd_dma_offset); |
760 | if (!dev_priv->cmd_dma) { | 760 | if (!dev_priv->cmd_dma) { |
761 | DRM_ERROR("could not find command DMA region!\n"); | 761 | DRM_ERROR("could not find command DMA region!\n"); |
762 | savage_do_cleanup_bci(dev); | 762 | savage_do_cleanup_bci(dev); |
@@ -769,7 +769,7 @@ static int savage_do_init_bci(struct drm_device * dev, drm_savage_init_t * init) | |||
769 | savage_do_cleanup_bci(dev); | 769 | savage_do_cleanup_bci(dev); |
770 | return -EINVAL; | 770 | return -EINVAL; |
771 | } | 771 | } |
772 | drm_core_ioremap(dev_priv->cmd_dma, dev); | 772 | drm_legacy_ioremap(dev_priv->cmd_dma, dev); |
773 | if (!dev_priv->cmd_dma->handle) { | 773 | if (!dev_priv->cmd_dma->handle) { |
774 | DRM_ERROR("failed to ioremap command " | 774 | DRM_ERROR("failed to ioremap command " |
775 | "DMA region!\n"); | 775 | "DMA region!\n"); |
@@ -895,11 +895,11 @@ static int savage_do_cleanup_bci(struct drm_device * dev) | |||
895 | } else if (dev_priv->cmd_dma && dev_priv->cmd_dma->handle && | 895 | } else if (dev_priv->cmd_dma && dev_priv->cmd_dma->handle && |
896 | dev_priv->cmd_dma->type == _DRM_AGP && | 896 | dev_priv->cmd_dma->type == _DRM_AGP && |
897 | dev_priv->dma_type == SAVAGE_DMA_AGP) | 897 | dev_priv->dma_type == SAVAGE_DMA_AGP) |
898 | drm_core_ioremapfree(dev_priv->cmd_dma, dev); | 898 | drm_legacy_ioremapfree(dev_priv->cmd_dma, dev); |
899 | 899 | ||
900 | if (dev_priv->dma_type == SAVAGE_DMA_AGP && | 900 | if (dev_priv->dma_type == SAVAGE_DMA_AGP && |
901 | dev->agp_buffer_map && dev->agp_buffer_map->handle) { | 901 | dev->agp_buffer_map && dev->agp_buffer_map->handle) { |
902 | drm_core_ioremapfree(dev->agp_buffer_map, dev); | 902 | drm_legacy_ioremapfree(dev->agp_buffer_map, dev); |
903 | /* make sure the next instance (which may be running | 903 | /* make sure the next instance (which may be running |
904 | * in PCI mode) doesn't try to use an old | 904 | * in PCI mode) doesn't try to use an old |
905 | * agp_buffer_map. */ | 905 | * agp_buffer_map. */ |
diff --git a/drivers/gpu/drm/via/via_dma.c b/drivers/gpu/drm/via/via_dma.c index 6fc0648dd37f..d17d8f245c1a 100644 --- a/drivers/gpu/drm/via/via_dma.c +++ b/drivers/gpu/drm/via/via_dma.c | |||
@@ -161,7 +161,7 @@ int via_dma_cleanup(struct drm_device *dev) | |||
161 | if (dev_priv->ring.virtual_start) { | 161 | if (dev_priv->ring.virtual_start) { |
162 | via_cmdbuf_reset(dev_priv); | 162 | via_cmdbuf_reset(dev_priv); |
163 | 163 | ||
164 | drm_core_ioremapfree(&dev_priv->ring.map, dev); | 164 | drm_legacy_ioremapfree(&dev_priv->ring.map, dev); |
165 | dev_priv->ring.virtual_start = NULL; | 165 | dev_priv->ring.virtual_start = NULL; |
166 | } | 166 | } |
167 | 167 | ||
@@ -200,7 +200,7 @@ static int via_initialize(struct drm_device *dev, | |||
200 | dev_priv->ring.map.flags = 0; | 200 | dev_priv->ring.map.flags = 0; |
201 | dev_priv->ring.map.mtrr = 0; | 201 | dev_priv->ring.map.mtrr = 0; |
202 | 202 | ||
203 | drm_core_ioremap(&dev_priv->ring.map, dev); | 203 | drm_legacy_ioremap(&dev_priv->ring.map, dev); |
204 | 204 | ||
205 | if (dev_priv->ring.map.handle == NULL) { | 205 | if (dev_priv->ring.map.handle == NULL) { |
206 | via_dma_cleanup(dev); | 206 | via_dma_cleanup(dev); |
diff --git a/drivers/gpu/drm/via/via_map.c b/drivers/gpu/drm/via/via_map.c index 67e70e955504..0b3522dba6e8 100644 --- a/drivers/gpu/drm/via/via_map.c +++ b/drivers/gpu/drm/via/via_map.c | |||
@@ -39,14 +39,14 @@ static int via_do_init_map(struct drm_device *dev, drm_via_init_t *init) | |||
39 | return -EINVAL; | 39 | return -EINVAL; |
40 | } | 40 | } |
41 | 41 | ||
42 | dev_priv->fb = drm_core_findmap(dev, init->fb_offset); | 42 | dev_priv->fb = drm_legacy_findmap(dev, init->fb_offset); |
43 | if (!dev_priv->fb) { | 43 | if (!dev_priv->fb) { |
44 | DRM_ERROR("could not find framebuffer!\n"); | 44 | DRM_ERROR("could not find framebuffer!\n"); |
45 | dev->dev_private = (void *)dev_priv; | 45 | dev->dev_private = (void *)dev_priv; |
46 | via_do_cleanup_map(dev); | 46 | via_do_cleanup_map(dev); |
47 | return -EINVAL; | 47 | return -EINVAL; |
48 | } | 48 | } |
49 | dev_priv->mmio = drm_core_findmap(dev, init->mmio_offset); | 49 | dev_priv->mmio = drm_legacy_findmap(dev, init->mmio_offset); |
50 | if (!dev_priv->mmio) { | 50 | if (!dev_priv->mmio) { |
51 | DRM_ERROR("could not find mmio region!\n"); | 51 | DRM_ERROR("could not find mmio region!\n"); |
52 | dev->dev_private = (void *)dev_priv; | 52 | dev->dev_private = (void *)dev_priv; |
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index ac4ca4b59fdf..4a72db4b4329 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -1310,24 +1310,6 @@ struct drm_gem_object *drm_gem_object_lookup(struct drm_device *dev, | |||
1310 | struct drm_file *filp, | 1310 | struct drm_file *filp, |
1311 | u32 handle); | 1311 | u32 handle); |
1312 | 1312 | ||
1313 | extern void drm_core_ioremap(struct drm_local_map *map, struct drm_device *dev); | ||
1314 | extern void drm_core_ioremap_wc(struct drm_local_map *map, struct drm_device *dev); | ||
1315 | extern void drm_core_ioremapfree(struct drm_local_map *map, struct drm_device *dev); | ||
1316 | |||
1317 | static __inline__ struct drm_local_map *drm_core_findmap(struct drm_device *dev, | ||
1318 | unsigned int token) | ||
1319 | { | ||
1320 | struct drm_map_list *_entry; | ||
1321 | list_for_each_entry(_entry, &dev->maplist, head) | ||
1322 | if (_entry->user_token == token) | ||
1323 | return _entry->map; | ||
1324 | return NULL; | ||
1325 | } | ||
1326 | |||
1327 | static __inline__ void drm_core_dropmap(struct drm_local_map *map) | ||
1328 | { | ||
1329 | } | ||
1330 | |||
1331 | struct drm_device *drm_dev_alloc(struct drm_driver *driver, | 1313 | struct drm_device *drm_dev_alloc(struct drm_driver *driver, |
1332 | struct device *parent); | 1314 | struct device *parent); |
1333 | void drm_dev_ref(struct drm_device *dev); | 1315 | void drm_dev_ref(struct drm_device *dev); |
diff --git a/include/drm/drm_legacy.h b/include/drm/drm_legacy.h index 98626317e48b..cc6e528069a8 100644 --- a/include/drm/drm_legacy.h +++ b/include/drm/drm_legacy.h | |||
@@ -58,4 +58,19 @@ void drm_legacy_idlelock_release(struct drm_lock_data *lock); | |||
58 | /* drm_pci.c dma alloc wrappers */ | 58 | /* drm_pci.c dma alloc wrappers */ |
59 | void __drm_legacy_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); | 59 | void __drm_legacy_pci_free(struct drm_device *dev, drm_dma_handle_t * dmah); |
60 | 60 | ||
61 | /* drm_memory.c */ | ||
62 | void drm_legacy_ioremap(struct drm_local_map *map, struct drm_device *dev); | ||
63 | void drm_legacy_ioremap_wc(struct drm_local_map *map, struct drm_device *dev); | ||
64 | void drm_legacy_ioremapfree(struct drm_local_map *map, struct drm_device *dev); | ||
65 | |||
66 | static __inline__ struct drm_local_map *drm_legacy_findmap(struct drm_device *dev, | ||
67 | unsigned int token) | ||
68 | { | ||
69 | struct drm_map_list *_entry; | ||
70 | list_for_each_entry(_entry, &dev->maplist, head) | ||
71 | if (_entry->user_token == token) | ||
72 | return _entry->map; | ||
73 | return NULL; | ||
74 | } | ||
75 | |||
61 | #endif /* __DRM_DRM_LEGACY_H__ */ | 76 | #endif /* __DRM_DRM_LEGACY_H__ */ |