QT with EGLFS for iMX6 | Newhaven Display Parallel Display Port RGB24

Hello

I am currently working on a project with the Apalis iMX6 Quad Core Module in combination with the Ixora Board. I use a Toolchain from Linaro (Version below). Because of some reasons I don’t use the entire image for the iMX6 provided by Toradex. I just use the Kernel, the Device-Tree and U-Boot, but I exchanged the Toradex Filesystem created by Yocto by a Debian Filesystem.

Because of this I’m struggling to find the necessary libraries to use QT with EGLFS for the iMX6. I already compiled QT V5.12 and tested it with the LinuxFB, this works fine. But in order to use graphic acceleration I would prefer to use EGLFS. Now I wonder where I can find the necessary libraries?

The QT5 output for EGLFS after executing the .configure command is the following:

QPA backends:
  DirectFB ............................... no
  EGLFS .................................. yes
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... no
    EGLFS GBM ............................ no
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGL on X11 ........................... yes
  LinuxFB ................................ yes
  VNC .................................... yes
  Mir client ............................. no

The detailed output for EGLFS i.Mx6 is the following:

Checking for i.Mx6 EGL... 
+ cd /home/rafael/audiostreamer/tools/qt5/qt5_full/qt-build/config.tests/egl-viv && /home/rafael/audiostreamer/tools/qt5/qt5_full/qt-build/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" -early "CONFIG += cross_compile" 'QMAKE_USE += egl' 'QMAKE_LIBS_EGL = -L/home/rafael/audiostreamer/tools/debian_rootfs/debian/usr/lib/arm-linux-gnueabihf -lEGL' 'QMAKE_INCDIR_EGL = /home/rafael/audiostreamer/tools/debian_rootfs/debian/usr/include' /home/rafael/audiostreamer/tools/qt5/qt5_full/qt-build/config.tests/egl-viv
+ cd /home/rafael/audiostreamer/tools/qt5/qt5_full/qt-build/config.tests/egl-viv && MAKEFLAGS= /usr/bin/make
> /home/rafael/audiostreamer/tools/linaro/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=hard -O2 -w -fPIC -DEGL_API_FB=1 -DLINUX=1 -I. -I/home/rafael/audiostreamer/tools/debian_rootfs/debian/usr/include -I/home/rafael/audiostreamer/tools/debian_rootfs/debian/usr/include -I/home/rafael/audiostreamer/tools/qt5/qt5_full/qtbase/mkspecs/devices/linux-imx6-g++ -o main.o main.cpp
> main.cpp:3:28: fatal error: EGL/eglvivante.h: No such file or directory
>  #include <EGL/eglvivante.h>
>                             ^
> compilation terminated.
> Makefile:194: recipe for target 'main.o' failed
> make: *** [main.o] Error 1
test config.qtbase_gui.tests.egl-viv FAILED

The problem is, that I can’t find the requested library with the header file eglvivante.h. I already searched in the filesystem of the image provided by Toradex.

When I try to execute an application on the iMX6 with EGLFS, I get the following output:

QML debugging is enabled. Only use this in a safe environment.
qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_viv"
MESA-LOADER: failed to retrieve device information
gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/vivante_dri.so: cannot open shared object file: No such file or directory
failed to load driver: vivante
gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/kms_swrast_dri.so: cannot open shared object file: No such file or directory
failed to load driver: kms_swrast
gbm: failed to open any driver (search paths /usr/lib/arm-linux-gnueabihf/dri:${ORIGIN}/dri:/usr/lib/dri)
gbm: Last dlopen error: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory
failed to load swrast driver
Could not create GBM device ()
Could not open DRM device
Aborted

I’ve already tried to copy the requested libraries above from the Toradex filesystem to my Debian Filesystem. But without success.


The second problem is the use of a Newhaven Display. I’ve tried to use it with the RGB24 parallel connector. I’m using the generic display adapter provided by Toradex to connect the third party display.

https://developer.toradex.com/knowledge-base/generic-rgb-display-adapter-board

At first I’ve tried to set the environment variable in u-boot to:

setenv vidargs 'mxc_hdmi.only_cea=0 video=mxcfb0:dev=lcd,800x480M@60,if=RGB24
video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M'

But the display stays black.

Afterwards I’ve tried to add the exact display timings to the lcd driver “fsl,lcd” in the toradex kernel.
So I’ve created a new entry;

{
	/* 800x480 @ 65 Hz , pixel clk @ 33 MHz */ /* 30303 ps*/
	"newhaven1", 65, 800, 480, 30303,
	 .left_margin = 128,
	 .right_margin = 40,
	 .hsync_len = 48,
	 .upper_margin = 45,
	 .lower_margin = 13,
	 .vsync_len = 3,
	 .sync = 0,
	 .vmode = FB_VMODE_NONINTERLACED,
	 .flag = 0,}

After that I compiled the kernel successfully and added it to the image. In the image I changed the environment variable for the display in uEnv.txt to:

setenv vidargs 'mxc_hdmi.only_cea=0 video=mxcfb0:dev=lcd,newhaven1,if=RGB24
video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off fbmem=32M'

Then I’ve flashed the board with the Toradex EasyInstaller. When I check the FrameBuffer configuration with fbset I get the timings I’ve added in the driver, but the display doesn’t work. The screen lights up for a short time while booting. Afterward the display is just black with the backlight on.

Has anyone an idea how to fix these two problems?

Here are the exact version of the used tools:

##Versions:

###Easy Installer

apalis-imx6_toradexeasyinstaller_1.8-20181019

###Image

Apalis-iMX6_LXDE-Image_2.8b5.156-20181228

###Toolchain

gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf

###Kernel 2.8b

toradex_4.9-2.3.x-imx
Linux kernel : 4.9.144

###Device Tree

imx6q-apalis-ixora-v1.1.dtb
(from imx6q-apalis-ixora-v1.1.dts)

###UBoot 2.8b

2016.11-toradex

###Filesyste

Debian 9.8

###Display:

NHD-5.0-800480MB-ATXL-CTP
https://www.newhavendisplay.com/nhd50800480mbatxlctp-p-9611.html

###QT:

Qt V 5.12

Hi @iMX6_user

Welcome to the Toradex Community!

The problem is, that I can’t find the requested library with the header file eglvivante.h. I already searched in the filesystem of the image provided by Toradex.

If you do an OpenEmbedded Build, then you should find this file here. `./build/tmp-glibc/work/apalis_imx6-angstrom-linux-gnueabi/gstreamer1.0-plugins-imx/0.13.0+gitAUTOINC+963aea60b1-r0/recipe-sysroot/usr/include/EGL/eglvivante.h

or alternatively you can find these files also here:
https://github.com/zOrg1331/fsl-gpu-viv-mx6q/tree/master/usr

The second problem is the use of a Newhaven Display.

Could you ask a new question for this, please? This will help us to keep the topics well arranged. You might also edit this question.
Concerning the display, could you provide a datasheet of the display.

Thanks and best regards,
Jaski