From eee392370f17589075f6855594bae4217b8f0167 Mon Sep 17 00:00:00 2001 From: Patrick Daly Date: Fri, 18 Mar 2016 17:50:13 -0700 Subject: [PATCH] ion: Remove unnecessary dma_sync in ion_page_pool The MSM ion implementation moved the dma_sync call to ion_system_heap_allocate() It was inadvertently added back to ion_page_pool_alloc_pages() by commit cb22ca6421aeb9f3835fae4ef7d965dd6be9d7b9 ("ion: add snapshot of ion support for MSM") Change-Id: I61029996e59c754b37f45543c4263a100b427867 Signed-off-by: Patrick Daly --- drivers/staging/android/ion/ion_page_pool.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index cfe3b37a38fa..1ec915c16c9b 100644 --- a/drivers/staging/android/ion/ion_page_pool.c +++ b/drivers/staging/android/ion/ion_page_pool.c @@ -34,16 +34,11 @@ static void *ion_page_pool_alloc_pages(struct ion_page_pool *pool) if (!page) return NULL; - ion_page_pool_alloc_set_cache_policy(pool, page); - -/* TODO QCOM - Identify if this sync is needed */ - ion_pages_sync_for_device(NULL, page, PAGE_SIZE << pool->order, - DMA_BIDIRECTIONAL); - - if (pool->gfp_mask & __GFP_ZERO) { + if (pool->gfp_mask & __GFP_ZERO) if (msm_ion_heap_high_order_page_zero(page, pool->order)) goto error_free_pages; - } + + ion_page_pool_alloc_set_cache_policy(pool, page); return page; error_free_pages: