summaryrefslogtreecommitdiff
path: root/drivers/mxc/gpu-viv/hal/os/linux
diff options
context:
space:
mode:
authorRichard Liu <xuegang.liu@nxp.com>2019-07-10 00:20:17 +0800
committerXianzhong <xianzhong.li@nxp.com>2019-08-30 03:50:28 +0800
commit5a0e323efcd6b08152fe70ac7d424117aaf07f3e (patch)
tree4b3203f9765a095ae663e6f8fa6df978f0590b8c /drivers/mxc/gpu-viv/hal/os/linux
parent131408cc5b9f7957502c01bf3bff18c9c4b4fca0 (diff)
MA-13450-3 [#ccc] Revert layer memory allocation to virtual pool patches
UI operation will very slow when install more applications and enter one by one. The reason is system free memory very low, allocate memory from system will trigger kswapd to do reclaim, but there is no much free memory in system, CMA still have free memory but can't be used. Below two patches has side effect, revert them from p4 main branch. Revert "MA-13450-1 [#ccc] Switch layer memory allocation to virtual pool to improve performance." This reverts commit 32d2126c353dd87dee77f4076422361a87766d32. Revert "MA-13450-2 [#ccc] Switch layer memory allocation to virtual pool to improve performance." This reverts commit 4bcff5472fc11a9379a7e6c72e0c8e0fdd9f636e. Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
Diffstat (limited to 'drivers/mxc/gpu-viv/hal/os/linux')
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c
index f915796208df..85984de9604b 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_drm.c
@@ -168,7 +168,6 @@ static int viv_ioctl_gem_create(struct drm_device *drm, void *data,
gckVIDMEM_NODE nodeObject;
gctUINT32 flags = gcvALLOC_FLAG_DMABUF_EXPORTABLE;
gceSTATUS status = gcvSTATUS_OK;
- gcePOOL pool = gcvPOOL_DEFAULT;
gal_dev = (gckGALDEVICE)drm->dev_private;
if (!gal_dev)
@@ -192,10 +191,6 @@ static int viv_ioctl_gem_create(struct drm_device *drm, void *data,
{
flags |= gcvALLOC_FLAG_CMA_LIMIT;
}
- if (args->flags & DRM_VIV_GEM_VIRTUAL_POOL) {
- flags &= ~(gcvALLOC_FLAG_CMA_LIMIT | gcvALLOC_FLAG_CONTIGUOUS);
- pool = gcvPOOL_VIRTUAL;
- }
gckOS_ZeroMemory(&iface, sizeof(iface));
iface.command = gcvHAL_ALLOCATE_LINEAR_VIDEO_MEMORY;
@@ -204,7 +199,7 @@ static int viv_ioctl_gem_create(struct drm_device *drm, void *data,
iface.u.AllocateLinearVideoMemory.alignment = 256;
iface.u.AllocateLinearVideoMemory.type = gcvSURF_RENDER_TARGET; /* should be general */
iface.u.AllocateLinearVideoMemory.flag = flags;
- iface.u.AllocateLinearVideoMemory.pool = pool;
+ iface.u.AllocateLinearVideoMemory.pool = gcvPOOL_DEFAULT;
gcmkONERROR(gckDEVICE_Dispatch(gal_dev->device, &iface));
kernel = gal_dev->device->map[gal_dev->device->defaultHwType].kernels[0];