[3.19.y-ckt stable] Patch "drm/rockchip: unset pgoff when mmap'ing gems" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Tue Dec 15 23:17:11 UTC 2015
This is a note to let you know that I have just added a patch titled
drm/rockchip: unset pgoff when mmap'ing gems
to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue
This patch is scheduled to be released in version 3.19.8-ckt12.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 0e49463ce98665e398f09f5dd87ee1b75968e1c8 Mon Sep 17 00:00:00 2001
From: Heiko Stuebner <heiko at sntech.de>
Date: Mon, 9 Nov 2015 20:52:43 +0100
Subject: drm/rockchip: unset pgoff when mmap'ing gems
commit a8594f20cafadb6ba58f915dea5f2c94a9333b1a upstream.
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 at sntech.de>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gpu/drm/rockchip/rockchip_drm_gem.c
index b79dc98..02007f0 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);
--
1.9.1
More information about the kernel-team
mailing list