mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
drm/rockchip: gem: support cpu cache for drm memory
Change-Id: Ic9ca3d0862eb8c5c4d8a002db8cbbcc93d2dcc02 Signed-off-by: Mark Yao <mark.yao@rock-chips.com> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
@@ -525,6 +525,10 @@ static int rockchip_drm_gem_object_mmap(struct drm_gem_object *obj,
|
||||
int ret;
|
||||
struct rockchip_gem_object *rk_obj = to_rockchip_obj(obj);
|
||||
|
||||
/* default is wc. */
|
||||
if (rk_obj->flags & ROCKCHIP_BO_CACHABLE)
|
||||
vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
|
||||
|
||||
/*
|
||||
* We allocated a struct page table for rk_obj, so clear
|
||||
* VM_PFNMAP flag that was set by drm_gem_mmap_obj()/drm_gem_mmap().
|
||||
|
||||
Reference in New Issue
Block a user