coreInfoArray use offset as coreIndex, not use hardware core
Fix: 8744fe58453c("MGS-5372 [#imx-1708] Fix the VX/CL apps hang for 865 GPU/VIP
")
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
1M GPU MMU pages are used for flat mapping by default,
there is no performance benefit for dynamic mapping.
disabled 1M MMU page to fix unstable GPU problems.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Some drm common code changed, gpu driver need do the matched update on 5.4 kernel.
1. Some drm API name changed.
drm_gem_object_unreference_unlocked() rename as drm_gem_object_put_unlocked().
drm_dev_unref() rename as drm_dev_put().
2. Drm/prime remove DRIVER_PRIME, driver needs do the matched update.
3. API gem_prime_export remove input parameter "struct drm_device *dev".
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
BUG25711 CL244484 Android CTS: some cases fail in gles2/gles3
group on imx815 AndroidP/wayland BUG25710 CL244484 [vkcts1.1.3]:fail when run
"dEQP-VK.glsl.limits.near_max.fragment_input.*" on 815 wayland BUG25646
CL244484 [vkcts1.1.3]:dEQP-VK.glsl.limits.near_max.fragment_input.* fail on
815 wayland
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
gpu_probe set coherent_dma_mask with 40BIT configuration,
L5.4 dma_alloc_wc will return physical address beyond 4GB,
that will cause GPU hang and kernel panic problem on QM.
default coherent_dma_mask is 32BIT, can meet GPU requirement,
this patch remove coherent_dma_mask setting from GPU driver.
Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
fix the gpu dump when enable vProfile on 8MN_EVK
Date: 7th Nov ,2019
Signed-off-by Ya Zhou <ya.zhou@nxp.com>
(cherry picked from commit 053c97c0387673c4e730d9b2f780f8cde5fcdf5b)
Update the imx platform gpu driver to accommodate layerscape soc,
so that both platform can share the same platform driver.
Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
dummy draw is required for 8MM GPU errata - HBN1285,
this fix shall be applied for GPU power-up transition,
otherwise GPU shader hang with the unnecessary flush.
check GPU MMU state to enable dummy draw fix only.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
When vm_mmap fail, code jump to OnError with error status and userLogical variable != 0.
Then _CMAFSLUnmapUser is called with a invalid virtual address (MdlMap->vmaAddr) and cause panic.
Check userLogical to avoid GPU kernel panic for error handling.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
Fix GPU memory problem when disable CMA allocator,
set LINUX_CMA_FSL=0 in gc_hal_kernel_platform_imx.config
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
there are lots of PFNs busy message when run GPU tests:
[ 622.370671] alloc_contig_range: [4ea70, 4ea7c) PFNs busy
[ 626.518072] alloc_contig_range: [4ea90, 4ea9c) PFNs busy
this problem is related with CMA migration for fragments,
move CMA allocator after GFP to avoid memory migration,
also fix CMA preempt for contiguous memory request.
can improve CTS and gpubench benchmarks on M850D.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
(cherry picked from commit ad77ed61b72c8362b04361acd2deb685fee15436)
When alloc NonContiguous1MPages, if malloc fail, need free the pages to avoid memory leak
Date: 24 Oct, 2019
Signed-off-by: Xianzhong Li <xianzhong.li@nxp.com>
The intension of this code is that, if current core is null, go to get the next one.
If it's already the last one, no need to do this.
Date: 23 Oct, 2019
Signed-off-by: Ella Feng <ella.feng@nxp.com>
The SCU API used in this file is for 4.19 kernel version and need to upgrade,
Need to modify the method to distinguish 8QM.8QXP by compatible string
drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c
This api was removed from kernel. Use new instead.
../drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c: In function ‘gckOS_GetTime’:
../drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c:3006:5: error: implicit declaration of function ‘do_gettimeofday’ [-Werror=implicit-function-declaration]
do_gettimeofday(&tv);
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
gc_hal_kernel_platform_imx.c:90:14: fatal error: linux/busfreq-imx.h: No such file or directory
# include <linux/busfreq-imx.h>
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>