MGS-2429 [#imx-282] [MX8] Met gpu hang when repeatly do gles vg stress test on gpu0...
authorYuchou Gan <yuchou.gan@nxp.com>
Tue, 6 Dec 2016 17:52:54 +0000 (01:52 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:57:56 +0000 (14:57 -0500)
There are 2 devices in the MX8 board, and each needs a commitMutex, instead of one big commitMutex in the kernel.

Date: Dec 6, 2016
Signed-off-by: Yuchou Gan<yuchou.gan@nxp.com>
drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c

index 2ac7872..271bc9c 100644 (file)
@@ -2160,6 +2160,12 @@ gckKERNEL_Dispatch(
         break;
 
     case gcvHAL_EVENT_COMMIT:
+        gcmkONERROR(gckOS_AcquireMutex(Kernel->os,
+            Kernel->device->commitMutex,
+            gcvINFINITE
+            ));
+
+        commitMutexAcquired = gcvTRUE;
         /* Commit an event queue. */
         if (Interface->u.Event.engine == gcvENGINE_BLT)
         {
@@ -2177,6 +2183,8 @@ gckKERNEL_Dispatch(
                 Kernel->eventObj, gcmUINT64_TO_PTR(Interface->u.Event.queue)));
         }
 
+        gcmkONERROR(gckOS_ReleaseMutex(Kernel->os, Kernel->device->commitMutex));
+        commitMutexAcquired = gcvFALSE;
         break;
 
     case gcvHAL_COMMIT: