MGS-6108-2 [#imx-2416] fix vg kernel panic for command unlock

vg kernel does not suppport asynchronous event, uses sync unlock

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
This commit is contained in:
Xianzhong 2020-12-06 10:29:48 +08:00
parent ea9340aac5
commit ce27972ecb
1 changed files with 17 additions and 4 deletions

View File

@ -1824,12 +1824,25 @@ _BottomHalfUnlockVideoMemory(
/* Deref handle. */
gckVIDMEM_HANDLE_Dereference(Kernel, ProcessID, Node);
/* Perform asynchronous unlock */
gcmkONERROR(gckEVENT_Unlock(Kernel->eventObj, gcvKERNEL_PIXEL, nodeObject));
#if gcdENABLE_VG
if (Kernel->vg != gcvNULL)
{
/* Unlock video memory, synced. */
gcmkONERROR(gckVIDMEM_NODE_Unlock(Kernel, nodeObject, ProcessID, gcvNULL));
/* Submit the event queue. */
gcmkONERROR(gckEVENT_Submit(Kernel->eventObj, gcvTRUE, gcvFALSE));
/* Deref node. */
gcmkONERROR(gckVIDMEM_NODE_Dereference(Kernel, nodeObject));
}
else
#else
{
/* Perform asynchronous unlock */
gcmkONERROR(gckEVENT_Unlock(Kernel->eventObj, gcvKERNEL_PIXEL, nodeObject));
/* Submit the event queue. */
gcmkONERROR(gckEVENT_Submit(Kernel->eventObj, gcvTRUE, gcvFALSE));
}
#endif
return gcvSTATUS_OK;
OnError: