drm/exynos: fix incorrect cpu address for dma_mmap_attrs()

dma_mmap_attrs() should be called with cpu address returned by
dma_alloc_attrs(). Existing code however passed pages array base as cpu
address. This worked only by a pure luck on ARM architecture. This patch
fixes this issue.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
Marek Szyprowski 2016-02-11 12:32:07 +01:00 committed by Inki Dae
parent f3fb3d8237
commit 9aa3821bb2
2 changed files with 2 additions and 2 deletions

View file

@ -50,7 +50,7 @@ static int exynos_drm_fb_mmap(struct fb_info *info,
if (vm_size > exynos_gem->size) if (vm_size > exynos_gem->size)
return -EINVAL; return -EINVAL;
ret = dma_mmap_attrs(helper->dev->dev, vma, exynos_gem->pages, ret = dma_mmap_attrs(helper->dev->dev, vma, exynos_gem->cookie,
exynos_gem->dma_addr, exynos_gem->size, exynos_gem->dma_addr, exynos_gem->size,
&exynos_gem->dma_attrs); &exynos_gem->dma_attrs);
if (ret < 0) { if (ret < 0) {

View file

@ -335,7 +335,7 @@ static int exynos_drm_gem_mmap_buffer(struct exynos_drm_gem *exynos_gem,
if (vm_size > exynos_gem->size) if (vm_size > exynos_gem->size)
return -EINVAL; return -EINVAL;
ret = dma_mmap_attrs(drm_dev->dev, vma, exynos_gem->pages, ret = dma_mmap_attrs(drm_dev->dev, vma, exynos_gem->cookie,
exynos_gem->dma_addr, exynos_gem->size, exynos_gem->dma_addr, exynos_gem->size,
&exynos_gem->dma_attrs); &exynos_gem->dma_attrs);
if (ret < 0) { if (ret < 0) {