2023-06-07 07:43 AM
Many thanks for your help!
I have a custom STM32MP157c boards that works OK when the galcore.ko module is not deployed.
When the galcore,ko module is deployed, the screen doesn't show up the usual image and after the boot image has been displayed, it stays black.
From cat /home/weston/weston.log, it seems that something foes wrong with a signal 15 ([11:24:37.793] caught signal 15):
[11:24:17.605] Output 'DPI-1' enabled with head(s) DPI-1
[11:24:17.605] Compositor capabilities:
arbitrary surface rotation: yes
screen capture uses y-flip: no
cursor planes: yes
arbitrary resolutions: no
view mask clipping: yes
explicit sync: no
color operations: no
presentation clock: CLOCK_MONOTONIC, id 1
presentation clock resolution: 0.000000001 s
[11:24:17.606] Loading module '/usr/lib/weston/desktop-shell.so'
[11:24:17.609] launching '/usr/libexec/weston-keyboard'
[11:24:17.612] Warning: support for deprecated wl_shell interface is enabled. Please migrate legacy clients to xdg-shell.
[11:24:17.613] Loading module '/usr/lib/weston/systemd-notify.so'
[11:24:17.614] launching '/usr/libexec/weston-desktop-shell'
[11:24:37.793] caught signal 15
[11:24:37.825] output for input device event0 removed
[11:24:37.830] event0 - generic ft5x06 (79): device removed
[11:24:37.833] BUG: layer_list is not empty after shutdown. Calls to weston_layer_fini() are missing somwhere.
Date: 2023-06-07 UTC
[11:25:26.648] weston 10.0.0
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 10.0.0
From dmesg, the galcore seems loaded OK
[ 22.255642] dwc2 49000000.usb-otg: bound driver configfs-gadget
[ 24.262156] galcore: loading out-of-tree module taints kernel.
[ 24.311348] Galcore version 6.4.9.436021
[ 27.481105] cfg80211: Loading compiled-in X.509 certificates for regulatory database
The modinfo seems OK
root@stm32mp1:~# modinfo galcore
filename: /lib/modules/5.15.67/extra/galcore.ko
import_ns: VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver
license: Dual MIT/GPL
description: Vivante Graphics Driver
alias: of:N*T*Cvivante,gcC*
alias: of:N*T*Cvivante,gc
alias: of:N*T*Cst,gcnanoC*
alias: of:N*T*Cst,gcnano
depends:
name: galcore
vermagic: 5.15.67 preempt mod_unload modversions ARMv7 p2v8
root@stm32mp1:~# uname -a
Linux stm32mp1 5.15.67 #12 PREEMPT Wed May 17 13:36:18 CEST 2023 armv7l armv7l armv7l GNU/Linux
The modversion of the modules seems OK:
root@stm32mp1:~# modprobe --dump-modversions /lib/modules/5.15.67/kernel/net/mac80211/mac80211.ko | grep "module_layout"
0x168d302d module_layout
root@stm32mp1:~# modprobe --dump-modversions /lib/modules/5.15.67/kernel/lib/ | grep "module_layout"
crc-ccitt.ko crc-itu-t.ko crc4.ko crypto/ libcrc32c.ko ts_bm.ko ts_fsm.ko ts_kmp.ko
root@stm32mp1:~# modprobe --dump-modversions /lib/modules/5.15.67/kernel/lib/libcrc32c.ko | grep "module_layout"
0x168d302d module_layout
root@stm32mp1:~# modprobe --dump-modversions /lib/modules/5.15.67/extra/galcore.ko | grep "module_layout"
0x168d302d module_layout
Is signal 15 the clue to investigate?
Can you help me debug the reason for signal 15?
Many thanks again
Michele
Solved! Go to Solution.
2023-09-08 12:54 PM - edited 2023-09-10 10:30 AM
The error was that I was using the 6.4.6 version of the galcore driver, instead of using the 6.4.7 HAL version of the SDK that can be easily found in .../STM32MPU_workspace/STM32MP1-Ecosystem-v4.0.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/sources/arm-ostl-linux-gnueabi/gcnano-driver-stm32mp-6.4.7-stm32mp1-r1-rc2-r0/gcnano-driver-6.4.7
2023-06-07 07:56 AM
Hi, I add this information from weston --tty=1 --debug:
root@stm32mp1:~# weston --tty=1 --debug
Date: 2023-06-07 UTC
[14:54:03.229] weston 10.0.0
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 10.0.0
[14:54:03.229] Command line: weston --tty=1 --debug
[14:54:03.229] OS: Linux, 5.15.67, #12 PREEMPT Wed May 17 13:36:18 CEST 2023, armv7l
[14:54:03.230] Flight recorder: enabled
[14:54:03.230] Using config file '/etc/xdg/weston/weston.ini'
WARNING: debug protocol has been enabled. This is a potential denial-of-service attack vector and information leak.
[14:54:03.231] Output repaint window is 100 ms maximum.
[14:54:03.231] Loading module '/usr/lib/libweston-10/drm-backend.so'
[14:54:03.249] initializing drm backend
[14:54:03.249] Trying logind launcher...
[14:54:03.251] logind: failed to get session seat
[14:54:03.251] logind: cannot setup systemd-logind helper error: (No data available), using legacy fallback
[14:54:03.251] Trying weston_launch launcher...
[14:54:03.251] could not get launcher fd from env
[14:54:03.251] Trying direct launcher...
[14:54:03.260] using /dev/dri/card0
[14:54:03.260] DRM: supports atomic modesetting
[14:54:03.260] DRM: supports GBM modifiers
[14:54:03.260] DRM: supports picture aspect ratio
[14:54:03.260] Loading module '/usr/lib/libweston-10/gl-renderer.so'
[14:54:03.289] EGL client extensions: EGL_EXT_client_extensions
EGL_EXT_platform_base EGL_KHR_platform_wayland
EGL_EXT_platform_wayland EGL_KHR_platform_gbm
[14:54:03.289] failed to initialize display
[14:54:03.290] EGL error state: EGL_NOT_INITIALIZED (0x3001)
[14:54:03.290] failed to initialize egl
[14:54:03.290] BUG: layer_list is not empty after shutdown. Calls to weston_layer_fini() are missing somwhere.
[14:54:03.290] fatal: failed to create compositor backend
Internal warning: debug scope 'drm-backend' has not been destroyed.
2023-09-06 02:52 AM
Hi! Anyone have any idea why the EGL fails to initialize the display? In pixman mode, all works fine.
2023-09-06 04:46 AM
I wonder if anybody can suggest me how to debug the EGL library for STM32MP1; anybody knows where the source files are located?
2023-09-08 03:21 AM
I have enabled the galcore DEBUG mode and I see that there is a probl;em with some structures size... from dmesg:
[ 36.355766] drv_ioctl(1012): input or/and output structures are invalid:exp 376 bytes,in 424,out 0,filp=55787860 ioctlCode=0 arg=3266442176
[ 36.372427] gcmkONERROR: status=-1(gcvSTATUS_INVALID_ARGUMENT) @ drv_ioctl(1015)
[ 36.428139] drv_ioctl(1012): input or/and output structures are invalid:exp 376 bytes,in 424,out 0,filp=55787860 ioctlCode=0 arg=3268850048
[ 36.454061] gcmkONERROR: status=-1(gcvSTATUS_INVALID_ARGUMENT) @ drv_ioctl(1015)
[ 36.463382] Process 1085 has entries in its database:
[ 36.473490] gcmkONERROR: status=-1(gcvSTATUS_INVALID_ARGUMENT) @ gckOS_UnmapMemoryEx(1345)
2023-09-08 09:07 AM
I managed to solve the GPU problem installing the version 6.4.6 of the GPU galcore driver:
[ 23.608541] galcore: loading out-of-tree module taints kernel.
[ 23.777721] Init with Level=1, Zone=0x0FFFFFFF
[ 23.784846] Galcore version 6.4.6.342038
[ 23.793471] gckOS_ImportAllocators(171) Allocator: dma
[ 23.800798] gckOS_ImportAllocators(171) Allocator: user
[ 23.809218] gckOS_ImportAllocators(171) Allocator: dma
[ 23.817537] gckOS_ImportAllocators(171) Allocator: dmabuf
[ 23.827156] gckOS_ImportAllocators(171) Allocator: reserved-mem
[ 23.858760] [drm] Initialized vivante 1.0.0 20170808 for 59000000.gpu on minor 1
But nonetheless, the egl cannot initialize the display, as I can see from the weston.log):
[15:47:43.168] logind: session control granted
[15:47:43.256] using /dev/dri/card0
[15:47:43.257] DRM: supports atomic modesetting
[15:47:43.257] DRM: supports GBM modifiers
[15:47:43.257] DRM: supports picture aspect ratio
[15:47:43.272] Loading module '/usr/lib/libweston-10/gl-renderer.so'
[15:47:43.361] EGL client extensions: EGL_EXT_client_extensions
EGL_EXT_platform_base EGL_KHR_platform_wayland
EGL_EXT_platform_wayland EGL_KHR_platform_gbm
[15:47:43.364] failed to initialize display
[15:47:43.364] EGL error state: EGL_NOT_INITIALIZED (0x3001)
[15:47:43.364] failed to initialize egl
[15:47:43.377] BUG: layer_list is not empty after shutdown. Calls to weston_layer_fini() are missing somwhere.
[15:47:43.377] fatal: failed to create compositor backend
Anyone has an idea about how to debug what is happening inside the eglInitialize() function thjt fails?
2023-09-08 12:54 PM - edited 2023-09-10 10:30 AM
The error was that I was using the 6.4.6 version of the galcore driver, instead of using the 6.4.7 HAL version of the SDK that can be easily found in .../STM32MPU_workspace/STM32MP1-Ecosystem-v4.0.0/Developer-Package/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15/sources/arm-ostl-linux-gnueabi/gcnano-driver-stm32mp-6.4.7-stm32mp1-r1-rc2-r0/gcnano-driver-6.4.7