Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9aa3821b authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Inki Dae
Browse files

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: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent f3fb3d82
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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) {
+1 −1
Original line number Diff line number Diff line
@@ -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) {