diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2017-04-21 00:33:54 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-06-02 10:57:06 +0300 |
commit | 57c22f7cc24ab6284d23d370929f2d452bb79729 (patch) | |
tree | 6ce0f004cbd147bf70e6fefa2123c07fa282faa1 /drivers | |
parent | 4fa6ce48a97d687fa733292cb7103a8971976280 (diff) | |
download | linux-57c22f7cc24ab6284d23d370929f2d452bb79729.tar.bz2 |
drm: omapdrm: Rename the omap_gem_object addrs field to dma_addrs
The field contains DMA addresses, clarify that by renaming it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_gem.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index f4e0daede6e2..6a5a4d07f675 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -95,7 +95,7 @@ struct omap_gem_object { struct page **pages; /** addresses corresponding to pages in above array */ - dma_addr_t *addrs; + dma_addr_t *dma_addrs; /** * Virtual address, if mapped. @@ -277,7 +277,7 @@ static int omap_gem_attach_pages(struct drm_gem_object *obj) } } - omap_obj->addrs = addrs; + omap_obj->dma_addrs = addrs; omap_obj->pages = pages; return 0; @@ -323,15 +323,15 @@ static void omap_gem_detach_pages(struct drm_gem_object *obj) if (omap_obj->flags & (OMAP_BO_WC|OMAP_BO_UNCACHED)) { int i, npages = obj->size >> PAGE_SHIFT; for (i = 0; i < npages; i++) { - if (omap_obj->addrs[i]) + if (omap_obj->dma_addrs[i]) dma_unmap_page(obj->dev->dev, - omap_obj->addrs[i], + omap_obj->dma_addrs[i], PAGE_SIZE, DMA_BIDIRECTIONAL); } } - kfree(omap_obj->addrs); - omap_obj->addrs = NULL; + kfree(omap_obj->dma_addrs); + omap_obj->dma_addrs = NULL; drm_gem_put_pages(obj, omap_obj->pages, true, false); omap_obj->pages = NULL; @@ -739,10 +739,10 @@ void omap_gem_cpu_sync(struct drm_gem_object *obj, int pgoff) struct drm_device *dev = obj->dev; struct omap_gem_object *omap_obj = to_omap_bo(obj); - if (is_cached_coherent(obj) && omap_obj->addrs[pgoff]) { - dma_unmap_page(dev->dev, omap_obj->addrs[pgoff], + if (is_cached_coherent(obj) && omap_obj->dma_addrs[pgoff]) { + dma_unmap_page(dev->dev, omap_obj->dma_addrs[pgoff], PAGE_SIZE, DMA_BIDIRECTIONAL); - omap_obj->addrs[pgoff] = 0; + omap_obj->dma_addrs[pgoff] = 0; } } @@ -760,7 +760,7 @@ void omap_gem_dma_sync(struct drm_gem_object *obj, return; for (i = 0; i < npages; i++) { - if (!omap_obj->addrs[i]) { + if (!omap_obj->dma_addrs[i]) { dma_addr_t addr; addr = dma_map_page(dev->dev, pages[i], 0, @@ -773,7 +773,7 @@ void omap_gem_dma_sync(struct drm_gem_object *obj, } dirty = true; - omap_obj->addrs[i] = addr; + omap_obj->dma_addrs[i] = addr; } } |