Skip to content
Snippets Groups Projects
Commit 5ced43c6 authored by Xianzhong's avatar Xianzhong
Browse files

MGS-4569 [#imx-1347] fix GPU hang when play 4K video


kernel process(with zero pid) has no mdl mapping,
skip kernel process to avoid invalid mdl access.

also remove memory barrier to avoid rcu issue.

Signed-off-by: default avatarXianzhong <xianzhong.li@nxp.com>
parent ad0f8896
No related merge requests found
...@@ -4500,7 +4500,7 @@ _CacheOperation( ...@@ -4500,7 +4500,7 @@ _CacheOperation(
) )
{ {
PLINUX_MDL mdl = (PLINUX_MDL)Handle; PLINUX_MDL mdl = (PLINUX_MDL)Handle;
PLINUX_MDL_MAP mdlMap; PLINUX_MDL_MAP mdlMap = gcvNULL;
gckALLOCATOR allocator; gckALLOCATOR allocator;
if (!mdl || !mdl->allocator) if (!mdl || !mdl->allocator)
...@@ -4513,11 +4513,14 @@ _CacheOperation( ...@@ -4513,11 +4513,14 @@ _CacheOperation(
if (allocator->ops->Cache) if (allocator->ops->Cache)
{ {
mutex_lock(&mdl->mapsMutex); if (ProcessID)
{
mutex_lock(&mdl->mapsMutex);
mdlMap = FindMdlMap(mdl, ProcessID); mdlMap = FindMdlMap(mdl, ProcessID);
mutex_unlock(&mdl->mapsMutex); mutex_unlock(&mdl->mapsMutex);
}
if (ProcessID && mdlMap == gcvNULL) if (ProcessID && mdlMap == gcvNULL)
{ {
...@@ -4534,8 +4537,6 @@ _CacheOperation( ...@@ -4534,8 +4537,6 @@ _CacheOperation(
} }
} }
_MemoryBarrier();
return gcvSTATUS_OK; return gcvSTATUS_OK;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment