mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-08 23:35:05 +07:00
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:
parent
74ebc70622
commit
d380a1632c
@ -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) {
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user