diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2016-04-22 16:34:07 +0900 |
---|---|---|
committer | Inki Dae <daeinki@gmail.com> | 2016-05-10 23:11:44 +0900 |
commit | 6aa5e85d7c1578cbe09881289403cba68c1e891d (patch) | |
tree | 105ff0c280da5474008efaaeccacacb638a33f9e /drivers/gpu/drm/exynos/exynos_drm_g2d.c | |
parent | b85881ddf2aa70d4a3ab9f8451127007e9f82496 (diff) | |
download | linux-6aa5e85d7c1578cbe09881289403cba68c1e891d.tar.bz2 |
drm/exynos: use directly DMA mapping APIs on g2d
There is no reason to be wapper functions to use DMA mapping APIs. Use
directly DMA mapping APIs and remove the wapper functions.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_g2d.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_g2d.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c index 193d3602dffb..493552368295 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c +++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c @@ -383,8 +383,8 @@ static void g2d_userptr_put_dma_addr(struct drm_device *drm_dev, return; out: - exynos_gem_unmap_sgt_from_dma(drm_dev, g2d_userptr->sgt, - DMA_BIDIRECTIONAL); + dma_unmap_sg(to_dma_dev(drm_dev), g2d_userptr->sgt->sgl, + g2d_userptr->sgt->nents, DMA_BIDIRECTIONAL); pages = frame_vector_pages(g2d_userptr->vec); if (!IS_ERR(pages)) { @@ -501,10 +501,10 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev, g2d_userptr->sgt = sgt; - ret = exynos_gem_map_sgt_with_dma(drm_dev, g2d_userptr->sgt, - DMA_BIDIRECTIONAL); - if (ret < 0) { + if (!dma_map_sg(to_dma_dev(drm_dev), sgt->sgl, sgt->nents, + DMA_BIDIRECTIONAL)) { DRM_ERROR("failed to map sgt with dma region.\n"); + ret = -ENOMEM; goto err_sg_free_table; } |