summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorXianzhong <b07117@freescale.com>2014-05-19 21:47:43 +0800
committerLoren Huang <b02279@freescale.com>2014-08-15 11:25:03 +0800
commit9d9d9235284e54f9da63e24e0e0bf37aee93e95c (patch)
tree352a71c027cd1b3588ec44ecc115a7e2b6e62e3a /drivers
parent2c33e32de3bd1a0b2aac70bea90d9a5dd4562dd5 (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 (cherry picked from commit 8d62ea9a655f1bb0ca86af222de7625abc8d2bc8) (cherry picked from commit cd5a9a37525d4d2f79b6013f4bd93779b900b854) (cherry picked from commit 31d6a06da4cf9beacd9b1ba7a7e67d41cee18f7d)
Diffstat (limited to 'drivers')
-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 56bed68c6822..6a0f8e0e2856 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
@@ -1177,6 +1177,9 @@ gckKERNEL_DestroyProcessDB(
/* Next next record. */
next = record->next;
+ gcmkONERROR(gckOS_ReleaseMutex(Kernel->os, Kernel->db->dbMutex));
+ acquired = gcvFALSE;
+
/* Dispatch on record type. */
switch (record->type)
{
@@ -1347,6 +1350,10 @@ gckKERNEL_DestroyProcessDB(
break;
}
+ gcmkONERROR(
+ gckOS_AcquireMutex(Kernel->os, Kernel->db->dbMutex, gcvINFINITE));
+ acquired = gcvTRUE;
+
/* Delete the record. */
gcmkONERROR(gckKERNEL_DeleteRecord(Kernel,
database,