void MTKPP_LOGTIME(MTKPP_ID id, const char * str) { if (g_init_done) { _MTKPP_DEBUG_LOG("%s", str); MTKPP_PrintQueueBuffer2(g_MTKPPdata[id], "%s", str); } else { _MTKPP_DEBUG_LOG("[not init] %s", str); } }
void MTKPP_4_SGXDumpDebugInfo_Aquire(void) { int i = 0; int allocate_size[] = { 1024 * 1024 * 4, // 4 MB 1024 * 1024 * 2, // 2 MB 1024 * 1024 * 1, // 1 MB 1024 * 512 // 512 KB }; MTK_PROC_PRINT_DATA *ppdata = g_MTKPPdata[MTKPP_ID_SGXDumpDebugInfo]; spin_lock_irqsave(&g_MTKPP_4_SGXDumpDebugInfo_lock, g_MTKPP_4_SGXDumpDebugInfo_irqflags); g_MTKPP_4_SGXDumpDebugInfo_current = (void *)current; /* try allocate by different size */ while (ppdata->data == NULL && i < ARRAY_SIZE(allocate_size)) { MTKPP_AllocData(ppdata, allocate_size[i++], 1024 * 64); if (ppdata->data != NULL) { MTKPP_CleanData(ppdata); break; } } if (ppdata->data == NULL) { PVR_DPF((PVR_DBG_ERROR, "%s: fail to allocate 512 KB for gpulog", __func__)); } /* print for reocrding start time */ MTKPP_PrintQueueBuffer2(ppdata, "=== start ==="); }