codec_mm: fix serial port prints "memory allocate failure" message.

PD#172077

Change-Id: Id89a4b3e26ae928a3be0f098592ce42cdaead49b
Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
This commit is contained in:
Peng Yixin
2018-08-30 10:03:30 +08:00
committed by Jianxin Pan
parent c5e8a587e1
commit b7a3f4eb7e

View File

@@ -926,12 +926,18 @@ static int codec_mm_page_alloc_from_slot(
/*
*ERR_LOG("can't alloc slot from system\n");
*/
pr_info("alloc default cma size fail, try %d pages\n",
alloc_pages);
if (codec_mm_get_sc_debug_mode() &
0x01) {
pr_info("alloc default cma size fail, try %d pages\n",
alloc_pages);
}
slot = codec_mm_slot_alloc(smgt,
alloc_pages * PAGE_SIZE, 0);
if (!slot) {
pr_info("slot alloc 4M fail!\n");
if (codec_mm_get_sc_debug_mode() &
0x01) {
pr_info("slot alloc 4M fail!\n");
}
break;
}
}