summaryrefslogtreecommitdiff
path: root/drivers/mxc/gpu-viv
diff options
context:
space:
mode:
authorYuchou Gan <yuchou.gan@nxp.com>2017-11-10 21:34:41 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commitc48b1b78b1128f4a73aebf439f89209bb4a57133 (patch)
treed7ccb271ed287ce68cfa754d77c75174ea955051 /drivers/mxc/gpu-viv
parentdc9391b04cf248830da2c5a01cf728eb94f5b8a3 (diff)
MGS-3349 [#ccc] [imx8qm] Met segmentation fault when run GLES samples stress on GPU0, GPU1 and bridged mode
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>
Diffstat (limited to 'drivers/mxc/gpu-viv')
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h1
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c3
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h
index 71e424bf7e12..92061c2d0348 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h
+++ b/drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_enum.h
@@ -2136,6 +2136,7 @@ gceCOMPRESSION_OPTION;
/* 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
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c
index 8d7cf271cadd..c8bfb12eda31 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/allocator/freescale/gc_hal_kernel_allocator_cma.c
@@ -146,7 +146,7 @@ _CMAFSLAlloc(
if (os->allocatorLimitMarker)
{
- if (Flags & gcvALLOC_FLAG_CMA_LIMIT)
+ if ((Flags & gcvALLOC_FLAG_CMA_LIMIT) && !(Flags & gcvALLOC_FLAG_CMA_PREEMPT))
{
priv->cmaLimitRequest = gcvTRUE;
}
@@ -564,6 +564,7 @@ _CMAFSLAlloctorInit(
if (Os->allocatorLimitMarker)
{
allocator->capability |= gcvALLOC_FLAG_CMA_LIMIT;
+ allocator->capability |= gcvALLOC_FLAG_CMA_PREEMPT;
}
*Allocator = allocator;
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
index f050781fad3a..0aad2049acf0 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
@@ -1422,6 +1422,7 @@ gckOS_AllocateNonPagedMemory(
if (Os->allocatorLimitMarker)
{
flag |= gcvALLOC_FLAG_CMA_LIMIT;
+ flag |= gcvALLOC_FLAG_CMA_PREEMPT;
}
/* Walk all allocators. */