This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to use the graphics acceleration of AM335X in QT?

Other Parts Discussed in Thread: UKERNEL

Does anybody know how to use am335x graphics acceleration in the QT?

I installed The Graphics_SDK_setuplinux_4_05_00_03.bin, and builded QT 4.7.3 with it, but the opengl examples of QT couldn't be run normally (there is no opengl graphics).

Here are some configurations and debugging informations,  I hope someone can help me,  Thank you very much!

1. Install Graphics SDK
./Graphics_SDK_setuplinux_4_05_00_03.bin --es8.x --sdk --mode console --prefix $HOME/Graphics_SDK_4_05_00_03
cd $HOME/Graphics_SDK_4_05_00_03
export ARCH=arm
make BUILD=debug OMAPES=8.x SUPPORT_XORG=0 all
make BUILD=debug OMAPES=8.x install

2. test gfxsdkdemos
/etc/init.d/335x-demo
cd /opt/gfxsdkdemos/ogles
The gfxsdkdemo program could be run normally.

3. Compile QT 4.7.3  Reference: http://processors.wiki.ti.com/index.php/Building_Qt_with_OpenGL_ES_accelerated_by_SGX
./configure -prefix /opt/qte-4.7.3 -debug -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-armv7-sgx-g++ -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -no-webkit -qt-mouse-pc -qt-mouse-linuxtp -qt-mouse-linuxinput -plugin-mouse-linuxtp -plugin-mouse-pc -fast -opengl es1 -qt-gfx-transformed -qt-gfx-vnc -qt-gfx-linuxfb -qt-gfx-multiscreen -qt-mouse-tslib -plugin-gfx-powervr -DQT_NO_QWS_CURSOR -QT_QWS_CLIENTBLIT -opensource -confirm-license

4. test qt opengl example [error occured ]

export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/opt/qte-4.7.3/lib

vi /etc/powervr.ini
modify  "WindowSystem=libpvrPVR2D_FRONTWSEGL.so" to "WindowSystem=libpvrQWSWSEGL.so"

cd /opt/qte-4.7.3/examples/opengl/textures
./textures -qws -display powervr
 
An error occured in the kernel module:
PVR_K:(Error): PVRSRVCreateDCSwapChainKM: Too few buffers [975,
root/Graphics_SDK_4_05_00_03/GFX_Linux_KM/services4/srvkm/common/deviceclass.c]
 
Here is the debug information  in Console:
PVR: Hint: Setting WindowSystem to libpvrQWSWSEGL.so
PVR:(Warning): PVRSRVMetricsTimeNow: not implemented [120, /pvr_metrics.c]
PVR:
PVR: Memory Stats
PVR: ------------
PVR: High Water Mark = 4104 bytes
PVR: 4104 bytes still allocated in 1 allocations
PVR: 1   -  4104 bytes at 0x30918 - tls.c:49
PVR:
PVR:(Warning): PVR2DEnumerateDevices: display device name too long, trunc[   98.638603] PVR_K:(Error):
P
VRSRVCreateDCSwapChainKM: Too few buffers [975,
root/Graphics_SDK_4_05_00_03/GFX_Linux_KM/services4/srvkm/common/deviceclass.c]
ating [161, /pvr2dinit.c]
PVR:
PVR: Memory Stats
PVR: ------------
PVR: High Water Mark = 4104 bytes
PVR:
PVR: 4104 bytes still allocated in 1 allocations
PVR:
PVR: 1   -  4104 bytes at 0x30918 - tls.c:49
PVR:
PVR:(Error): PVRSRVCreateDCSwapChain: Error - 2 returned [512, /bridged_pvr_dc_glue.c]
PVR:(Error): PVR2DCreateFlipChain: can't create flipchain [217, /pvr2dflip.c]
QEglContext::createSurface(): Unable to create EGL surface, error = 0x3001
PVR:
PVR:  Texture allocation HWM = 1 bytes
PVR:(Warning): HW Recovery stats: Host: 0        uKernel: 0 [131, /sgxrender_context.c]
PVR:
PVR: Memory Stats
PVR: ------------
PVR: High Water Mark = 70892 bytes
PVR:
PVR: 4104 bytes still allocated in 1 allocations
PVR:
PVR: 1   -  4104 bytes at 0x30918 - tls.c:49
PVR:
QEglContext::createSurface(): Unable to create EGL surface, error = 0x3001
PVR:
PVR:  Texture allocation HWM = 1 bytes
PVR:(Warning): HW Recovery stats: Host: 0        uKernel: 0 [131, /sgxrender_context.c]
PVR:
PVR: Memory Stats
PVR: ------------
PVR: High Water Mark = 70892 bytes
PVR:
PVR: 4104 bytes still allocated in 1 allocations
PVR:
PVR: 1   -  4104 bytes at 0x30918 - tls.c:49
PVR:
QEglContext::createSurface(): Unable to create EGL surface, error = 0x3001
PVR:
PVR:  Texture allocation HWM = 1 bytes
PVR:(Warning): HW Recovery stats: Host: 0        uKernel: 0 [131, /sgxrender_context.c]
PVR:
PVR: Memory Stats
PVR: ------------
PVR: High Water Mark = 70892 bytes
PVR:
PVR: 4104 bytes still allocated in 1 allocations
PVR:
PVR: 1   -  4104 bytes at 0x30918 - tls.c:49
PVR:
QEglContext::createSurface(): Unable to create EGL surface, error = 0x3001
PVR:
PVR:  Texture allocation HWM = 1 bytes
PVR:(Warning): HW Recovery stats: Host: 0        uKernel: 0 [131, /sgxrender_context.c]
PVR:
PVR: Memory Stats
PVR: ------------
PVR: High Water Mark = 70892 bytes
PVR:
PVR: 4104 bytes still allocated in 1 allocations
PVR:
PVR: 1   -  4104 bytes at 0x30918 - tls.c:49
PVR:
QEglContext::createSurface(): Unable to create EGL surface, error = 0x3001
PVR:
PVR:  Texture allocation HWM = 1 bytes
PVR:(Warning): HW Recovery stats: Host: 0        uKernel: 0 [131, /sgxrender_context.c]
PVR:
PVR: Memory Stats
PVR: ------------
PVR: High Water Mark = 70892 bytes
PVR:
PVR: 4104 bytes still allocated in 1 allocations
PVR:
PVR: 1   -  4104 bytes at 0x30918 - tls.c:49
PVR:
QEglContext::createSurface(): Unable to create EGL surface, error = 0x3001
PVR:
PVR:  Texture allocation HWM = 1 bytes
PVR:(Warning): HW Recovery stats: Host: 0        uKernel: 0 [131, /sgxrender_context.c]
PVR:
PVR: Memory Stats
PVR: ------------
PVR: High Water Mark = 70892 bytes
PVR:
PVR: 4104 bytes still allocated in 1 allocations
PVR:
PVR: 1   -  4104 bytes at 0x30918 - tls.c:49

5. When I change "WindowSystem=libpvrPVR2D_FRONTWSEGL.so" to "WindowSystem=libpvrQWSWSEGL.so",
The gfxsdkdemos couldn't be run. and the the kernel module error occured :
PVR_K:(Error): PVRSRVCreateDCSwapChainKM: Too few buffers [975,
root/Graphics_SDK_4_05_00_03/GFX_Linux_KM/services4/srvkm/common/deviceclass.c]

 6. The same problem exists when building qt 4.7.4 or with "-opengl es2"