summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm/ttm_bo_util.c
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-04-07 10:21:27 +0000
committerDave Airlie <airlied@redhat.com>2010-04-20 14:13:09 +1000
commit0c321c79627189204d7d0bf65ab19f5ac419abed (patch)
tree9df52ae46164bdca3dab6a36d5ec17360c60b9e4 /drivers/gpu/drm/ttm/ttm_bo_util.c
parent96bf8b8778976a6e6a4fe4e6e0421d8ed7892798 (diff)
downloadlinux-stable-0c321c79627189204d7d0bf65ab19f5ac419abed.tar.gz
linux-stable-0c321c79627189204d7d0bf65ab19f5ac419abed.tar.bz2
linux-stable-0c321c79627189204d7d0bf65ab19f5ac419abed.zip
drm/ttm: remove io_ field from TTM V6
All TTM driver have been converted to new io_mem_reserve/free interface which allow driver to choose and return proper io base, offset to core TTM for ioremapping if necessary. This patch remove what is now deadcode. V2 adapt to match with change in first patch of the patchset V3 update after io_mem_reserve/io_mem_free callback balancing V4 adjust to minor cleanup V5 remove the needs ioremap flag V6 keep the ioremapping facility in TTM [airlied- squashed driver removals in here also] Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_util.c')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_util.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index d58eeb5ed22b..333b401ca4c9 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -83,24 +83,13 @@ EXPORT_SYMBOL(ttm_bo_move_ttm);
int ttm_mem_io_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
{
- struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type];
int ret;
- if (bdev->driver->io_mem_reserve) {
- if (!mem->bus.io_reserved) {
- mem->bus.io_reserved = true;
- ret = bdev->driver->io_mem_reserve(bdev, mem);
- if (unlikely(ret != 0))
- return ret;
- }
- } else {
- ret = ttm_bo_pci_offset(bdev, mem, &mem->bus.base, &mem->bus.offset, &mem->bus.size);
+ if (!mem->bus.io_reserved) {
+ mem->bus.io_reserved = true;
+ ret = bdev->driver->io_mem_reserve(bdev, mem);
if (unlikely(ret != 0))
return ret;
- mem->bus.addr = NULL;
- if (!(man->flags & TTM_MEMTYPE_FLAG_NEEDS_IOREMAP))
- mem->bus.addr = (void *)(((u8 *)man->io_addr) + mem->bus.offset);
- mem->bus.is_iomem = (mem->bus.size > 0) ? 1 : 0;
}
return 0;
}
@@ -149,7 +138,7 @@ void ttm_mem_reg_iounmap(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem,
man = &bdev->man[mem->mem_type];
- if (virtual && (man->flags & TTM_MEMTYPE_FLAG_NEEDS_IOREMAP || mem->bus.addr == NULL))
+ if (virtual && mem->bus.addr == NULL)
iounmap(virtual);
ttm_mem_io_free(bdev, mem);
}