cma limit feature is for gpu/dpu/vpu buffer sharing,
cma preempt feature is required for gpu mmu table setup.
remove cma limit flag for video memory since imx8 g2d use ion.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Signed-off-by: Yuchou Gan <yuchou.gan@nxp.com>
/* CMA allocator only */
#define gcvALLOC_FLAG_CMA_LIMIT 0x04000000
+#define gcvALLOC_FLAG_CMA_PREEMPT 0x08000000
/* GL_VIV internal usage */
#ifndef GL_MAP_BUFFER_OBJ_VIV
if (os->allocatorLimitMarker)
{
- if (Flags & gcvALLOC_FLAG_CMA_LIMIT)
+ if ((Flags & gcvALLOC_FLAG_CMA_LIMIT) && !(Flags & gcvALLOC_FLAG_CMA_PREEMPT))
{
priv->cmaLimitRequest = gcvTRUE;
}
if (Os->allocatorLimitMarker)
{
allocator->capability |= gcvALLOC_FLAG_CMA_LIMIT;
+ allocator->capability |= gcvALLOC_FLAG_CMA_PREEMPT;
}
*Allocator = allocator;
if (Os->allocatorLimitMarker)
{
flag |= gcvALLOC_FLAG_CMA_LIMIT;
+ flag |= gcvALLOC_FLAG_CMA_PREEMPT;
}
/* Walk all allocators. */