drm/ttm: fix, avoid iomapping system memory
authorJerome Glisse <jglisse@redhat.com>
Wed, 5 May 2010 09:02:44 +0000 (11:02 +0200)
committerDave Airlie <airlied@redhat.com>
Thu, 6 May 2010 23:15:47 +0000 (09:15 +1000)
If the memory is not iomem we should not try to
ioremap it. Should fix :

https://bugs.freedesktop.org/show_bug.cgi?id=27822

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Tested-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_bo_util.c

index a37a94872a14c888001356ca45ea5832881397a0..13012a1f1486c1bf4cad58608068f27b667b2335 100644 (file)
@@ -113,7 +113,7 @@ int ttm_mem_reg_ioremap(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem,
 
        *virtual = NULL;
        ret = ttm_mem_io_reserve(bdev, mem);
-       if (ret)
+       if (ret || !mem->bus.is_iomem)
                return ret;
 
        if (mem->bus.addr) {