Qt-X11 using -graphicssystem opengl and imx53

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Qt-X11 using -graphicssystem opengl and imx53

2,158 Views
JacobKjaergaard
Contributor I


Hi,

I have a rather specific problem with the imx53 platform.

We have a customer who wants to be able to use 'graphicssystem -opengl 'to their Qt application
- and requires 24bit framebuffer.

We have tried different setups and are not able to get it to work properly - screen is not updated,
just an uninitialized canvas is shown.

We have used hellogl_es2 example from Qt to reproduce the error.

We have narrowed the issue down to most likely be affected by the gpu blob 'amd-gpu-x11-bin-mx51'

Where can I see the release notes for amd-gpu-x11-bin-mx51 to what have changed?

Have anyone experienced something similar? 

Does the amd-gpu-driver supplier still improve the driver?

/Jacob

Our test setups have been the following:

1)
imx53 qsb similar board.
lvds panel 1024x768x24 (same issue on vga howver)
qt 4.8.2 (also tested with Qt 4.7.4)
X 1.11.2
amd-gpu-x11-bin-mx51 11.09.1-201112
kernel 2.6.35_11.09.1
gcc4.5 - linaro 201203

16-bit : FAILS (uboot cmdline not appended with ,bpp=32 to video)
24-bit: FAILS (uboot cmdline appended with ,bpp=32 to video)

2)
imx53 qsb
VGA-XGA
ubuntu distro 10.04 - the one that are shipped on the QSB SD card
qt 4.7.2
X 1.7.6
amd-gpu-x11-bin-mx51 11.01
kernel 2.6.35_11.01
gcc 4.4 - the one shipped with distro

16-bit : WORKS (uboot cmdline not appended with ,bpp=32 to video)
24-bit: FAILS (uboot cmdline appended with ,bpp=32 to video)

3)
imx53 qsb
VGA-XGA
ubuntu distro 10.04 - the one that are shipped on the QSB SD cardqt 4.7.2
X 1.7.6
amd-gpu-x11-bin-mx51 11.09.01
gcc 4.4 - the one shipped with distro

16-bit : FAILS (uboot cmdline not appended with ,bpp=32 to video)
24-bit: FAILS (uboot cmdline appended with ,bpp=32 to video)

4)
imx53 qsb similar board.
lvds panel 1024x768x24 (same issue on vga howver)
qt 4.8.2
X 1.11.2
amd-gpu-x11-bin-mx51 11.01
gcc4.5 - linaro 201203

16-bit : WORKS (uboot cmdline not appended with ,bpp=32 to video)
24-bit: FAILS (uboot cmdline appended with ,bpp=32 to video)

Observations:
no changes (according to git @ opensource.freescale) in gpu driver in kernel between 2.6.35_11.01 and 2.6.25_11.09.01

Console output is identical in all X/Qt/kernel setups, difference is based on amd-gpu-x11-bin-mx51:

amd-gpu-x11-bin-mx51-11.01
16-bit: Works great!
Output:
QGLShader::link: "Link was successful."
QGLShader::link: "Link was successful."
QGLShader::link: "Link was successful."
QGLShader::link: "Link was successful."
QGLShader::link: "Link was successful."
QGLShader::link: "Link was successful."
hijackWindow() context created for MainWindow(0x7ec085fc) 1
QGLWindowSurface: Using plain widget as window surface QGLWindowSurface(0x76f90)
QGLShader::link: "Link was successful."
QGLShader::link: "Link was successful."
QGLShader::link: "Link was successful."
QGLShader::link: "Link was successful."
hijackWindow() context created for QGroupBox(0x71af8) 2
QGLWindowSurface: Flushing to native child widget, may lead to significant performance loss
hijackWindow() context created for QLabel(0x71668) 3
hijackWindow() context created for QSlider(0x718e8) 4
hijackWindow() context created for QMenuBar(0x7a080) 5
QGLShader::link: "Link was successful."

32-bit: Qt seg faults with "Unable to find an X11 visual which matches EGL config 3"

amd-gpu-x11-bin-mx51-11.09.01
16-bit and 32-bit:
QGLShader::link: "Link was successful.
"
QGLShader::link: "Link was successful.
"
QGLShader::link: "Link was successful.
"
QGLShader::link: "Link was successful.
"
QGLShader::link: "Link was successful.
"
QGLShader::link: "Link was successful.
"
X Error: BadWindow (invalid Window parameter) 3
Major opcode: 8 (X_MapWindow)
Resource id: 0x200018

X Error: BadWindow (invalid Window parameter) 3
Major opcode: 2 (X_ChangeWindowAttributes)
Resource id: 0x20001f

(and alot other BadWindow errors with different opcode)

We have debugged this issue a lot before we narrowed it down to the amd-gpu-x11-bin-mx51 version
When using graphicssystem opengl Qt creates a GLContext -> EGL::createSurface for each widget,
when doing this in 11.09.1 it switches config on the way - first it starts successfully with config 0x3
(when breakpoint is set en EGL:createSurface) it then creates another surface using config 0x1
and then back to config 0x3 but then the first XError is already present and Qt does not display anything.
After EGL::createSurface has been called for each widget EGL:swapbuffers is running correctly,
but return "BadSurface (0x300D)", 

Tags (2)
0 Kudos
2 Replies

662 Views
JacobKjaergaard
Contributor I

I seem to have a working workaround:

starting Qt apps with "-visual truecolor" and "-geometry WxH" make 24-bit qt opengl work splendid!

0 Kudos

662 Views
gg
Contributor I

Hi Jacob,

I use the same platfom (imx53) with X11. As far as I know you can't support OpenGL on x11. This are the limitation of X11.

I ownder if you find solution to this problem because I am dealing with this problem right now.
Tnx.

0 Kudos