Hi,
We are using the OMAP5432 uEVM, and trying to get a basic GLESv2/EGL stack working. The board is running from a SD card prepared according to the GLSDK 6.00.00.07 Software Developers Guide.
A small "Hello World" GLESv2 application from Immagination SDK is used to test the stack. The source code is attached to this post.
This example is tested and works on the AM335x EVM with the TI Graphics SDK, but does not work on the OMAP5 uEVM.
I start by loading the omapdrm_pvr module with
$ modprobe omapdrm_pvr
Then I run pvrsrvinit, but this seems a bit buggy. First time I run it I get the following ouput
root@localhost:~# pvrsrvinit
[ 1184.736175]
[ 1184.737731] =============================================
[ 1184.743408] [ INFO: possible recursive locking detected ]
[ 1184.749084] 3.8.4-100-omap5 #3glsdk5 Tainted: G C O
[ 1184.754913] ---------------------------------------------
[ 1184.760589] pvrsrvinit/1881 is trying to acquire lock:
[ 1184.765991] (psPVRSRVMutex){+.+.+.}, at: [<bf0914a0>] DebugMemAllocRecordAdd+0x2c/0x120 [omapdrm_pvr]
[ 1184.775817]
[ 1184.775817] but task is already holding lock:
[ 1184.781951] (psPVRSRVMutex){+.+.+.}, at: [<bf08fce0>] PVRSRVOpen+0x18/0xec [omapdrm_pvr]
[ 1184.790588]
[ 1184.790588] other info that might help us debug this:
[ 1184.797454] Possible unsafe locking scenario:
[ 1184.797454]
[ 1184.803680] CPU0
[ 1184.806243] ----
[ 1184.808807] lock(psPVRSRVMutex);
[ 1184.812377] lock(psPVRSRVMutex);
[ 1184.815979]
[ 1184.815979] *** DEADLOCK ***
[ 1184.815979]
[ 1184.822174] May be due to missing lock nesting notation
[ 1184.822174]
[ 1184.829315] 2 locks held by pvrsrvinit/1881:
[ 1184.833801] #0: (drm_global_mutex){+.+.+.}, at: [<c02fbe38>] drm_stub_open+0x38/0x138
[ 1184.842254] #1: (psPVRSRVMutex){+.+.+.}, at: [<bf08fce0>] PVRSRVOpen+0x18/0xec [omapdrm_pvr]
[ 1184.851348]
[ 1184.851348] stack backtrace:
[ 1184.855957] [<c001a194>] (unwind_backtrace+0x0/0x11c) from [<c0080014>] (print_deadlock_bug+0xc8/0xf8)
[ 1184.865722] [<c0080014>] (print_deadlock_bug+0xc8/0xf8) from [<c0081868>] (validate_chain.isra.27+0x4e0/0x534)
[ 1184.876251] [<c0081868>] (validate_chain.isra.27+0x4e0/0x534) from [<c0082658>] (__lock_acquire+0x70c/0x7e4)
[ 1184.886566] [<c0082658>] (__lock_acquire+0x70c/0x7e4) from [<c0082d64>] (lock_acquire+0x128/0x14c)
[ 1184.895996] [<c0082d64>] (lock_acquire+0x128/0x14c) from [<c055836c>] (mutex_lock_nested+0x4c/0x3a8)
[ 1184.905609] [<c055836c>] (mutex_lock_nested+0x4c/0x3a8) from [<bf0914a0>] (DebugMemAllocRecordAdd+0x2c/0x120 [omapdrm_pvr])
[ 1184.917358] [<bf0914a0>] (DebugMemAllocRecordAdd+0x2c/0x120 [omapdrm_pvr]) from [<bf0916b0>] (_KMallocWrapper+0x38/0x44 [omapdrm_pvr])
[ 1184.930114] [<bf0916b0>] (_KMallocWrapper+0x38/0x44 [omapdrm_pvr]) from [<bf08d138>] (OSAllocMem_Impl+0x50/0x68 [omapdrm_pvr])
[ 1184.942138] [<bf08d138>] (OSAllocMem_Impl+0x50/0x68 [omapdrm_pvr]) from [<bf09a87c>] (PVRSRVPerProcessDataConnect+0x54/0x148 [omapdrm_pvr])
[ 1184.955383] [<bf09a87c>] (PVRSRVPerProcessDataConnect+0x54/0x148 [omapdrm_pvr]) from [<bf08fcf0>] (PVRSRVOpen+0x28/0xec [omapdrm_pvr])
[ 1184.968139] [<bf08fcf0>] (PVRSRVOpen+0x28/0xec [omapdrm_pvr]) from [<bf0a9d98>] (PVRSRVDrmOpen+0xb8/0xd8 [omapdrm_pvr])
[ 1184.979522] [<bf0a9d98>] (PVRSRVDrmOpen+0xb8/0xd8 [omapdrm_pvr]) from [<c0410394>] (dev_open+0x94/0xf0)
[ 1184.989410] [<c0410394>] (dev_open+0x94/0xf0) from [<c02fba40>] (drm_open_helper+0x178/0x2f0)
[ 1184.998382] [<c02fba40>] (drm_open_helper+0x178/0x2f0) from [<c02fbd7c>] (drm_open+0xa0/0x124)
[ 1185.007415] [<c02fbd7c>] (drm_open+0xa0/0x124) from [<c02fbebc>] (drm_stub_open+0xbc/0x138)
[ 1185.016204] [<c02fbebc>] (drm_stub_open+0xbc/0x138) from [<c00fc644>] (chrdev_open+0x11c/0x144)
[ 1185.025360] [<c00fc644>] (chrdev_open+0x11c/0x144) from [<c00f7014>] (do_dentry_open+0x1ac/0x268)
[ 1185.034667] [<c00f7014>] (do_dentry_open+0x1ac/0x268) from [<c00f72c8>] (finish_open+0x38/0x4c)
[ 1185.043823] [<c00f72c8>] (finish_open+0x38/0x4c) from [<c01050bc>] (do_last.isra.19+0x4e0/0x5e0)
[ 1185.053039] [<c01050bc>] (do_last.isra.19+0x4e0/0x5e0) from [<c0105260>] (path_openat+0xa4/0x420)
[ 1185.062377] [<c0105260>] (path_openat+0xa4/0x420) from [<c0105890>] (do_filp_open+0x2c/0x78)
[ 1185.071228] [<c0105890>] (do_filp_open+0x2c/0x78) from [<c00f8180>] (do_sys_open+0xe4/0x170)
[ 1185.080108] [<c00f8180>] (do_sys_open+0xe4/0x170) from [<c0012c60>] (ret_fast_syscall+0x0/0x3c)
Any further calls gives another output
root@localhost:~# pvrsrvinit
PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (129) [37, /srvinit.c]
PVR:(Error): main: SrvInit failed (129) [47, /pvrsrvinit.c]
If I try to run the GLESv2 example I get the following output
root@localhost:~# ./glesv2-test
PVR:(Warning): LoadWSModule: Window system module libpvrws_KMS.so did not validate native display [98, /generic_ws.c]
PVR:(Warning): LoadWSModule: Window system module libpvrws_WAYLAND.so did not validate native display [98, /generic_ws.c]
PVR:(Warning): LoadWSModule: Window system module libpvrws_OMAPDRI2.so did not validate native display [98, /generic_ws.c]
Error: eglInitialize() failed.
Has anyone had any luck getting GLESv2/EGL working outside X?
Best Regards,
Jesper Larsen