mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 12:21:37 +00:00
drm/rockchip: unset pgoff when mmap'ing gems
Commit371f0f085f
("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:371f0f085f
("ARM: 8426/1: dma-mapping: add missing range check in dma_mmap()") Signed-off-by: Heiko Stuebner <heiko@sntech.de>
This commit is contained in:
parent
d7b53fd9e3
commit
a8594f20ca
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user