diff options
author | Christoph Hellwig <hch@lst.de> | 2017-05-22 10:46:22 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-06-20 11:12:58 +0200 |
commit | b400585720820077704c84813930a3e255f87a23 (patch) | |
tree | 00df9e6dd202c11182dd76d4745c98138562e82f /drivers/gpu/drm/armada/armada_gem.c | |
parent | e0c7a510aea75db4927d810fb0a84233641b53c3 (diff) | |
download | op-kernel-dev-b400585720820077704c84813930a3e255f87a23.zip op-kernel-dev-b400585720820077704c84813930a3e255f87a23.tar.gz |
drm/armada: don't abuse DMA_ERROR_CODE
dev_addr isn't even a dma_addr_t, and DMA_ERROR_CODE has never been
a valid driver API. Add a bool mapped flag instead.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/gpu/drm/armada/armada_gem.c')
-rw-r--r-- | drivers/gpu/drm/armada/armada_gem.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/armada/armada_gem.c b/drivers/gpu/drm/armada/armada_gem.c index d6c2a5d..a76ca21 100644 --- a/drivers/gpu/drm/armada/armada_gem.c +++ b/drivers/gpu/drm/armada/armada_gem.c @@ -175,6 +175,7 @@ armada_gem_linear_back(struct drm_device *dev, struct armada_gem_object *obj) obj->phys_addr = obj->linear->start; obj->dev_addr = obj->linear->start; + obj->mapped = true; } DRM_DEBUG_DRIVER("obj %p phys %#llx dev %#llx\n", obj, @@ -205,7 +206,6 @@ armada_gem_alloc_private_object(struct drm_device *dev, size_t size) return NULL; drm_gem_private_object_init(dev, &obj->obj, size); - obj->dev_addr = DMA_ERROR_CODE; DRM_DEBUG_DRIVER("alloc private obj %p size %zu\n", obj, size); @@ -229,8 +229,6 @@ static struct armada_gem_object *armada_gem_alloc_object(struct drm_device *dev, return NULL; } - obj->dev_addr = DMA_ERROR_CODE; - mapping = obj->obj.filp->f_mapping; mapping_set_gfp_mask(mapping, GFP_HIGHUSER | __GFP_RECLAIMABLE); @@ -610,5 +608,6 @@ int armada_gem_map_import(struct armada_gem_object *dobj) return -EINVAL; } dobj->dev_addr = sg_dma_address(dobj->sgt->sgl); + dobj->mapped = true; return 0; } |