Hi all,
Currently I'm using toradex_4.9-2.3.x-imx kernel for my Buildroot system and I plan to do some testing on the Vivante GPU using the examples provided by Freescale :
But I've got errors for following tests :
root@imx-buildroot:~# /usr/share/examples/viv_samples/cl11/UnitTest/clinfo
>>>>>>>> /usr/share/examples/viv_samples/cl11/UnitTest/clinfo Starting...
!!! Error # -1001 at line 156 , in file main.cpp !!!
!!! Exiting...
root@imx-buildroot:~# /usr/share/examples/viv_samples/cl11/fft/fft 1024
Block size: 16
Print result: yes
Initializing device(s)...
ERROR:: -32 clCreateContextFromType failed
Also, I noticed that the gpu-viv's driver (i.e. galcore module was failed to load) :
root@imx-buildroot:~# dmesg | grep -i galcore
- [ 2.766399] Galcore version 6.2.4.150331
- [ 2.766630] galcore: probe of 130000.gpu failed with error -22
I'd like to know if this galcore.ko relates to the above tests and why did it fail to load, please ?
Thanks in advance,
Khang
Hello Khang,
Those examples are not tested, you have to migrate to 4.9.88, the yocto BSP include a separate package for vivante examples.
Regards
Hi Bio_TICFSL,
Thanks for your recommendation. Unfortunately I don't use Yocto but Buildroot with kernel version is 4.9.144 based on toradex_4.9-2.3.x-imx :
root@imx-buildroot:~# uname -ra
Linux imx-buildroot 4.9.144 #5 SMP Thu May 30 10:18:40 +07 2019 armv7l GNU/Linux
Also, my main interest is why galcore module failed to probe.
Best regards,
Khang
Hi again,
From this link https://boundarydevices.com/customizing-ubuntudebian-kernels/ I learn that galcore module has to be built externally for kernel >= 4.1.15 which is my case. Can anyone confirm?
Regards,
Khang
Hi Khang,
Have you had any luck with resolving your issue?
I have a similar issue on my custom IMX6 Solo based board. I am using buildroot version 2019.11 with imx kernel version 4.9.88 (linux-imx - i.MX Linux kernel). Buildroot is building version 6.2.4.p1.2 of both imx-gpu-g2d and imx-gpu-viv packages. I am getting the following error during boot:
mxc_vpu 2040000.vpu_fsl: VPU initialized
galcore: clk_get vg clock failed, disable vg!
Galcore version 6.2.4.150331
galcore: probe of 130000.gpu failed with error -22
I have the following packages enabled on buildroot:
BR2_PACKAGE_FREESCALE_IMX=y
BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q=y
BR2_PACKAGE_FIRMWARE_IMX=y
BR2_PACKAGE_IMX_GPU_G2D=y
BR2_PACKAGE_IMX_GPU_G2D_EXAMPLES=y
BR2_PACKAGE_IMX_GPU_VIV_EXAMPLES=y
BR2_PACKAGE_IMX_GPU_VIV_GMEM_INFO=y
I've also enabled the CONFIG_MXC_GPU_VIV in the kernel config. Any idea why I'm seeing this issue?
Regards,
Daniel
Hi Daniel,
This has been my solution :
Hello Khang,
Thank you so much for your response.
I actually managed to get it work by not using the driver in the kernel and using the viv kernel module in buildroot. It looks like enabling BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV in buildroot disables CONFIG_MXC_GPU_VIV in the kernel. These are now my configs:
Buildroot:
BR2_PACKAGE_FREESCALE_IMX=y
BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q=y
BR2_PACKAGE_FIRMWARE_IMX=y
BR2_PACKAGE_IMX_GPU_G2D=y
BR2_PACKAGE_IMX_GPU_VIV_GMEM_INFO=y
BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV=y
Kernel:
CONFIG_IMX_IPUV3_CORE=y
CONFIG_DRM=y
CONFIG_DRM_VIVANTE=y
CONFIG_DRM_IMX=y
CONFIG_DRM_IMX_PARALLEL_DISPLAY=y
CONFIG_FB_MXS=y
# CONFIG_MXC_GPU_VIV is not set
Best wishes,
Daniel
Hello Daniel,
If you look at <buildroot>/linux/linux.mk :
$(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV), $(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config)) |
I deduce that just one driver can be built at a time.
Best,
Khang