From acee9b64578788961993d6db3def5c8abb2e0c51 Mon Sep 17 00:00:00 2001 From: kfx Date: Thu, 22 Dec 2011 12:42:27 +0800 Subject: [PATCH] ion mmap: set page_protection 'cached' --- drivers/gpu/ion/ion_carveout_heap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/ion/ion_carveout_heap.c b/drivers/gpu/ion/ion_carveout_heap.c index 606adae13f48..2500d731809c 100644 --- a/drivers/gpu/ion/ion_carveout_heap.c +++ b/drivers/gpu/ion/ion_carveout_heap.c @@ -27,6 +27,8 @@ #include +#define ION_CACHED + struct ion_carveout_heap { struct ion_heap heap; struct gen_pool *pool; @@ -117,7 +119,11 @@ int ion_carveout_heap_map_user(struct ion_heap *heap, struct ion_buffer *buffer, return remap_pfn_range(vma, vma->vm_start, __phys_to_pfn(buffer->priv_phys) + vma->vm_pgoff, buffer->size, +#ifdef ION_CACHED + vma->vm_page_prot); +#else pgprot_noncached(vma->vm_page_prot)); +#endif } static struct ion_heap_ops carveout_heap_ops = { -- 2.34.1