diff options
author | Heiko Stuebner <heiko@sntech.de> | 2015-11-09 20:52:43 +0100 |
---|---|---|
committer | Mark Yao <mark.yao@rock-chips.com> | 2015-12-02 02:13:17 +0100 |
commit | a8594f20cafadb6ba58f915dea5f2c94a9333b1a (patch) | |
tree | 5545802c21d3560827cf7c19d0e919dfd44e3da1 | |
parent | drm/rockchip: vop: Correct enabled clocks during setup (diff) | |
download | linux-a8594f20cafadb6ba58f915dea5f2c94a9333b1a.tar.xz linux-a8594f20cafadb6ba58f915dea5f2c94a9333b1a.zip |
drm/rockchip: unset pgoff when mmap'ing gems
Commit 371f0f085f629 ("ARM: 8426/1: dma-mapping: add missing range check
in dma_mmap()") introduced offset-checking for mappings, which collides
with the fake-offset the drm sets for gems.
Other drm-drivers set this offset to 0 before doing the mapping, so
this looks like the correct way to go for rockchip as well.
Fixes: 371f0f085f629 ("ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
-rw-r--r-- | drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c index 8caea0a33dd8..d908321b94ce 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c @@ -67,6 +67,7 @@ static int rockchip_drm_gem_object_mmap(struct drm_gem_object *obj, * VM_PFNMAP flag that was set by drm_gem_mmap_obj()/drm_gem_mmap(). */ vma->vm_flags &= ~VM_PFNMAP; + vma->vm_pgoff = 0; ret = dma_mmap_attrs(drm->dev, vma, rk_obj->kvaddr, rk_obj->dma_addr, obj->size, &rk_obj->dma_attrs); |