Hi,
I'm using CompuLab CM-T35 board and idea is to have a SGX accelerated Qt application running on OMAP3530. I was following your instructions to integrate SGX accelerated Qt (http://processors.wiki.ti.com/index.php/Building_Qt_with_OpenGL_ES_accelerated_by_SGX).
Unfortunatelly, now for quite some time, i'm not able to make these things work so I'm asking here hoping to get some advices :)
First I want to give some details about software used:
- host machine: Ubuntu 10.04
- I'm using the OpenEmbedded framework for building the U-Boot, kernel and filesystem applicable for CM-T35 machine.
- U-Boot (2009.11-rc1-00055-g42a19ba-cm-t35)
- Linux kernel (2.6.32)
- with following bootargs: ubi.mtd=4,2048 root=ubi0:cm-t35-rootfs rootfstype=ubifs console=ttyS2,115200 omapfb.mode=dvi:1280x768MR-16@60 omapfb.vram=0:8M vram=8M omapdss.def_disp=dvi
- Filesystem (angstrom-2008.1)
- glibc linux
- console-image
- I don't need anything but this basic type of image as I don't want to use X11 but Qt's window manager QWS
- Qt Embedded Platform (4.6.1)
- TI Graphics drivers (1.6.16.3977 drivers from Graphics_SDK_4_03_00_02)
- Codesourcery cross-compiler (Sourcery G++ Lite 2010q1-202)
- gcc version 4.4.1
- cross-compiling Qt using gcc version 4.5 resulted with some errors. Seems like a bug in gcc (bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/675347).
So far what I have done successfully is:
- Booting up Linux kernel with no errors.
- Cross-compiled Qt Embedded 4.6.1
- with following ./configure parameters:
- -embedded arm -xplatform qws/linux-omap3530-g++ -platform qws/linux-x86-g++
- -no-accessibility -no-qt3support -no-javascript-jit -no-script -no-scripttools -no-webkit
- -qt-kbd-linuxinput -qt-mouse-linuxinput -qt-mouse-tslib
- -depths 16,24,32
- -opengl es2 -qt-gfx-linuxfb -plugin-gfx-powervr
- -fast
- -embedded arm -xplatform qws/linux-omap3530-g++ -platform qws/linux-x86-g++
- with following ./configure parameters:
- Cross-compiled and installed TI Graphics drivers (1.6.16.3977 drivers from Graphics_SDK_4_03_00_02)
- driver kernel modules successfully load (omaplfb.ko and pvrsrvkm.ko)
- Running Qt demos/examples without SGX graphics acceleration.
What is NOT working is:
- Running OGLES/OGLES2 demos
- they just segfault without any specific message
- Running Qt demos/examples using SGX acceleration
- i.e. running the <path to Qt>/examples/opengl/hellogl_es2/hellogl_es2 -qws -display powervr starts the application but gives the following error messages (with QT_DEBUG_PLUGINS=1):
- QFactoryLoader::QFactoryLoader() looking at
"/usr/local/Trolltech/QtEmbedded-4.6.1-arm/plugins/gfxdrivers/libqgfxpvregl.so"
keys ("powervr")
- QEglContext::createSurface(): Unable to create EGL surface, error = 0x300b
- QGLContext::makeCurrent(): Cannot make invalid context current
- QEglContext::createSurface(): Unable to create EGL surface, error = 0x300b
- QFactoryLoader::QFactoryLoader() looking at "/usr/local/Trolltech/QtEmbedded-4.6.1-arm/plugins/iconengines/libqsvgicon.so" keys ("svg", "svgz", "svg.gz")
- QFactoryLoader::QFactoryLoader() looking at
"/usr/local/Trolltech/QtEmbedded-4.6.1-arm/plugins/gfxdrivers/libqgfxpvregl.so"
keys ("powervr")
- powervr.ini file is set up correctly
- [default] WindowSystem=libpvrQWSWSEGL.so
- SGX drivers are loaded successfully - lsmod prints:
- Module Size Used by
- omaplfb 7794 0
- pvrsrvkm 149701 1 omaplfb
- i.e. running the <path to Qt>/examples/opengl/hellogl_es2/hellogl_es2 -qws -display powervr starts the application but gives the following error messages (with QT_DEBUG_PLUGINS=1):
Here's some info from provided SGX utilities:
- eglinfo
- every test passed well (i.e. Creating Window/Pbuffer surface ... Creating Open GL ES 1/Open GL ES 2/OpenVG context)
- but there's one confusing warning:
- Couldn't load library libGL.so: libGL.so: cannot open shared object file: No such file or directory
- there's definitely no libGL.so in /usr/lib or in any other path neither is generated after compiling SGX drivers
- and I don't know why it should be required in the first place as there is libGLES.so which I believe is the correct lib for OpenGLES
- gles1_texture_stream
- prints errors:
- Stream Device (null): numBuffers = 0, width = 0, height = 0, format = 0
- Failed to open /dev/bc_example (errno=2).
- which is ok as bufferclass_ti.ko driver isn't installed
- prints errors:
- gles2_texture_stream
- prints errors:
- Stream Device (null): numBuffers = 0, width = 0, height = 0, format = 0
- GL ERROR = 501InitTexStreamDisplay failed.
- not really sure why it fails
- prints errors:
- gles1test1
- runs without errors
- when exiting (CTRL+C) one of these errors appear (in no predictable order)
- VR_K: HWRecoveryResetSGX: SGX Hardware Recovery triggered
- Unable to handle kernel paging request at virtual address 44e9000b (this address is not always the same)
- running other tests after this is not possible (hardware reset needed)
- gles2test1
- same as gles1test1
- ovg_unit_test
- same as gles1test1
- pvr2d_test
- runs without errors
- services_test
- runs without errors
- sgx_blit_test
- runs without errors
- sgx_clipblit_test
- runs without errors
- sgx_flip_test
- runs for a while but fails with:
- Display Class API: map display surface to SGX
- OK
- OK
- OK
- OK
- OK
- OK
- FAIL - PVRSRV_ERROR_RETRY
- runs for a while but fails with:
- sgx_init_test
- runs without errors
- sgx_render_flip_test
- runs without errors
- xgles1test1
- not of interest as it requires X11
- xmultiegltest
- not of interest as it requires X11
So there's obviously a problem when drivers configured to work with Qt (WindowSystem=libpvrQWSWSEGL.so). When using default window system (i.e.WindowSystem=libpvrPVR2D_FRONTWSEGL.so) SGX utilities work mostly fine besides
- sgx_flip_test
- gles1_texture_stream
- gles2_texture_stream
which show the same behavior as in the Qt configuration.
Hope this is enough information for you to give me some advices. And please don't hesitate to ask for more details if needed.
Thank you,
Adi
P.S. there's a log attached from gfx_check script