diff options
author | Shawn Xiao <b49994@freescale.com> | 2015-05-14 20:15:09 +0800 |
---|---|---|
committer | Prabhu Sundararaj <prabhu.sundararaj@freescale.com> | 2015-05-15 11:18:16 -0500 |
commit | 6d5f951e94237c818576f4bcc6577d833f151804 (patch) | |
tree | 310337be0594e98829eb4bbe96287b4e667d5a30 | |
parent | de4988db5f038b71ed0fe1cfb3f3e4a04ab2d096 (diff) |
MA-4701 ENGR00278179-3 [#ccc] query openvg video memory database
query openvg video memory database with gpu memory tool
Date: Aug 11, 2014
Signed-off-by: Xianzhong <b07117@freescale.com>
Acked-by: Jason Liu
-rw-r--r-- | drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c index c1f37172d069..bd42f6d1ad07 100644 --- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c +++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c @@ -573,6 +573,42 @@ gceSTATUS gckVGKERNEL_Dispatch( &node )); + if (node->VidMem.memory->object.type == gcvOBJ_VIDMEM) + { + bytes = node->VidMem.bytes; + + gcmkONERROR( + gckKERNEL_AddProcessDB(Kernel, + processID, gcvDB_VIDEO_MEMORY_RESERVED, + node, + gcvNULL, + bytes)); + } + else + { + bytes = node->Virtual.bytes; + + if(node->Virtual.contiguous) + { + gcmkONERROR( + gckKERNEL_AddProcessDB(Kernel, + processID, gcvDB_VIDEO_MEMORY_CONTIGUOUS, + node, + gcvNULL, + bytes)); + } + else + { + gcmkONERROR( + gckKERNEL_AddProcessDB(Kernel, + processID, gcvDB_VIDEO_MEMORY_VIRTUAL, + node, + gcvNULL, + bytes)); + } + + } + gcmkERR_BREAK(gckKERNEL_AddProcessDB(Kernel, processID, gcvDB_VIDEO_MEMORY, node, @@ -599,6 +635,28 @@ gceSTATUS gckVGKERNEL_Dispatch( } #endif /* __QNXNTO__ */ + if (node->VidMem.memory->object.type == gcvOBJ_VIDMEM) + { + gcmkONERROR( + gckKERNEL_RemoveProcessDB(Kernel, + processID, gcvDB_VIDEO_MEMORY_RESERVED, + node)); + } + else if(node->Virtual.contiguous) + { + gcmkONERROR( + gckKERNEL_RemoveProcessDB(Kernel, + processID, gcvDB_VIDEO_MEMORY_CONTIGUOUS, + node)); + } + else + { + gcmkONERROR( + gckKERNEL_RemoveProcessDB(Kernel, + processID, gcvDB_VIDEO_MEMORY_VIRTUAL, + node)); + } + /* Free video memory. */ gcmkERR_BREAK(gckVIDMEM_Free(Kernel, node |