summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRebecca Schultz Zavin <rebecca@android.com>2012-10-18 21:54:01 -0700
committerNitin Garg <nitin.garg@freescale.com>2014-04-21 22:35:04 -0500
commitca7f7e4d2ee67753fb2ece5c4d8d02557a104880 (patch)
treeda8120df27cbd33f89f005661dd9e965a0518d8c /drivers/gpu
parent7934c8cceccdfe6de6fb9ffceddf4fb1f475b215 (diff)
gpu: ion: Don't flush allocatoins that come from the page pools
Change-Id: Ib08cb2cea3b6ea4b1ebf5a1b28abe6b9374fd2bd Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/ion/ion_system_heap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/ion/ion_system_heap.c b/drivers/gpu/ion/ion_system_heap.c
index 2dc3048ed6f6..26e6bbcda702 100644
--- a/drivers/gpu/ion/ion_system_heap.c
+++ b/drivers/gpu/ion/ion_system_heap.c
@@ -76,9 +76,14 @@ static struct page *alloc_buffer_page(struct ion_system_heap *heap,
if (order > 4)
gfp_flags = high_order_gfp_flags;
page = alloc_pages(gfp_flags, order);
+ if (!page)
+ return 0;
+ __dma_page_cpu_to_dev(page, 0, PAGE_SIZE << order,
+ DMA_BIDIRECTIONAL);
}
if (!page)
return 0;
+
if (split_pages)
split_page(page, order);
return page;
@@ -201,9 +206,6 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
kfree(info);
}
- dma_sync_sg_for_device(NULL, table->sgl, table->nents,
- DMA_BIDIRECTIONAL);
-
buffer->priv_virt = table;
return 0;
err1: