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:
Родитель
f3fb3d8237
Коммит
9aa3821bb2
|
@ -50,7 +50,7 @@ static int exynos_drm_fb_mmap(struct fb_info *info,
|
|||
if (vm_size > exynos_gem->size)
|
||||
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_attrs);
|
||||
if (ret < 0) {
|
||||
|
|
|
@ -335,7 +335,7 @@ static int exynos_drm_gem_mmap_buffer(struct exynos_drm_gem *exynos_gem,
|
|||
if (vm_size > exynos_gem->size)
|
||||
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_attrs);
|
||||
if (ret < 0) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче