From 0a978a3166274a7ba53408199e85f0a49e566582 Mon Sep 17 00:00:00 2001 From: Tuukka Toivonen Date: Mon, 26 Mar 2012 11:18:48 +0300 Subject: [PATCH] atomisp: use GFP_KERNEL on CTP when ISP allocates memory BZ: 27472 On CTP platform, ISP easily runs out of memory. Use GFP flags on allocation on CTP which allow kernel to wait for other drivers to free up memory before failing. Change-Id: I4f12ccfd85f7318db92b199daffe115c8789621e Signed-off-by: Tuukka Toivonen Reviewed-on: http://android.intel.com:8080/40731 Reviewed-by: Cohen, David A Tested-by: Koski, Anttu Reviewed-by: Laakso, Antti Reviewed-by: buildbot Tested-by: buildbot --- drivers/media/video/atomisp/hmm/hmm_bo.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/video/atomisp/hmm/hmm_bo.c b/drivers/media/video/atomisp/hmm/hmm_bo.c index 883eb93..cc39dd0 100644 --- a/drivers/media/video/atomisp/hmm/hmm_bo.c +++ b/drivers/media/video/atomisp/hmm/hmm_bo.c @@ -315,7 +315,12 @@ static int alloc_private_pages(struct hmm_buffer_object *bo, int from_highmem, unsigned int pgnr, order, blk_pgnr; struct page *pages; struct page_block *pgblk; +#ifdef CONFIG_BOARD_CTP + /* CLV runs easily out of memory, so try to allocate a bit harder */ + gfp_t gfp = GFP_KERNEL | __GFP_NOWARN; +#else gfp_t gfp = GFP_NOWAIT | __GFP_NOWARN; +#endif int i, j; int failure_number = 0; bool reduce_order = false; -- 2.7.4