[PATCH] drm/ttm: fix, avoid iomapping system memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 drivers/gpu/drm/ttm/ttm_bo_util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index a37a948..13012a1 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -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) {
-- 
1.7.0.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux