aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXianzhong <b07117@freescale.com>2014-05-19 09:47:43 -0400
committerXianzhong <b07117@freescale.com>2014-05-21 11:28:25 -0400
commitc8d4855ce8c6669534bfe109d0c6863834f12290 (patch)
tree7d332d246431a70def4714695a784b706b6a22b3
parent0bcfcbdcac7baa8e759fd64889ac45c00f4c5471 (diff)
ENGR00314119 [#1183] fixed database mutex multi-lock issue
The abnormal flow with the monkey test freeze problem is as below: gckKERNEL_DestroyProcessDB--> aquire mutex --> gckCOMMAND_Detach(gckEVENT_FreeContiguousMemory) --> ___RemoveRecordFromProcessDB --> gckKERNEL_RemoveProcessDB --> aquire the same mutex the fix is to disable mutex lock when perform record destory operations Date: May 19, 2014 Signed-off-by: Xianzhong <b07117@freescale.com> Acked-by: Jason Liu
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c
index 84f20c2f529e..382f78c80feb 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_db.c
@@ -1229,6 +1229,9 @@ gckKERNEL_DestroyProcessDB(
1229 /* Next next record. */ 1229 /* Next next record. */
1230 next = record->next; 1230 next = record->next;
1231 1231
1232 gcmkONERROR(gckOS_ReleaseMutex(Kernel->os, Kernel->db->dbMutex));
1233 acquired = gcvFALSE;
1234
1232 /* Dispatch on record type. */ 1235 /* Dispatch on record type. */
1233 switch (record->type) 1236 switch (record->type)
1234 { 1237 {
@@ -1436,6 +1439,10 @@ gckKERNEL_DestroyProcessDB(
1436 break; 1439 break;
1437 } 1440 }
1438 1441
1442 gcmkONERROR(
1443 gckOS_AcquireMutex(Kernel->os, Kernel->db->dbMutex, gcvINFINITE));
1444 acquired = gcvTRUE;
1445
1439 /* Delete the record. */ 1446 /* Delete the record. */
1440 gcmkONERROR(gckKERNEL_DeleteRecord(Kernel, 1447 gcmkONERROR(gckKERNEL_DeleteRecord(Kernel,
1441 database, 1448 database,