summaryrefslogtreecommitdiff
path: root/drivers/mxc
diff options
context:
space:
mode:
authorXianzhong <xianzhong.li@nxp.com>2020-12-06 10:29:48 +0800
committerXianzhong <xianzhong.li@nxp.com>2020-12-06 14:42:12 +0800
commitce27972ecbe81cb7007c45f36f0718f0063ad474 (patch)
treeb95b7973b8c00299a05e4623e42fcd0c6d431362 /drivers/mxc
parentea9340aac56590836b5b04ba0660f991f4e52fb4 (diff)
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>
Diffstat (limited to 'drivers/mxc')
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
index 04ea701a29c3..bb50ec0a0554 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
@@ -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: