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.

AM335x Qt5 platform EGLFS without Wayland/Weston

Other Parts Discussed in Thread: AM3359

Hello,


we need to run Qt5 with EGLFS platform plugin without Wayland/Weston on TI Sitara AM3359.

1) I've tested Processor SDK 02.00.02 and SDK 03.00.00 with Weston/Wayland. Everything seems to be OK. Then i disabled Weston and tried to execute the Qt5 opengl examples with the platform plugin EGLFS:

/usr/share/qt5/examples/opengl/..

./hellogl2 --platform eglfs  --> works

./cube --platform eglfs  --> !display remains dark!

I added 'WindowSystem=libpvrDRMWSEGL.so' to /etc/powervr.ini.

How can I solve this?

The EGLFS Plugin is included in the SDK Filesystem: usr/lib/qt5/plugins/platforms

2) I have the same behavior with a Debian 8 based Rootfilesystem and a custom Build of Qt5.5.1. Is there any documentation how to configure (qmake.conf) Qt5 to use SGX with the EGLFS platform plugin?

Is there a documentation which librarys are needed to support SGX with Qt5 platform EGLFS.

Best regards,

Ludwig

  • Hi,

    I will ask the software team to comment.
  • Hi Ludwig,

    See if the following wiki is useful:
    processors.wiki.ti.com/.../Building_Qt_with_OpenGL_ES_accelerated_by_SGX

    Note that this is for an older sdk.. In the latest sdks the vision sources are integrated in the sdk installation, however it should provide some hints for setting up your environment.

    Best Regards,
    Yordan
  • Hello Yordan,

    thank you for your quick answer. I'm already familiar with this wiki. It got me some steps further and I was able to compile the EGLFS Plugin. When I start a Qt5 Application a Mouse-Cursor appears but nothing else. Exactly the same behaviour like executing the 'cube' demo from the TI SDK. See above.

    To Compile fo EGLFS i had to add libwayland-server to my sysroot. Any Idea why this is the case?

    Some additional Infos:

    kmscube --> ok
    gles1test1 --> ok
    gles2test2 --> ok
    /usr/bin/SGX/demos/Raw --> all demos here are ok
    services_test --> not ok

    root@am335x-evm:~# /etc/init.d/weston stop
    Stopping Weston
    root@am335x-evm:~# kmscube
    trying to load module omapdrm...failed.
    trying to load module tilcdc...success.
    ### Display [0]: CRTC = 19, Connector = 21
    Mode chosen [800x480] : Clock => 33260, Vertical refresh => 64, Type => 72
    Horizontal => 800, 842, 906, 992, 0
    Vertical => 480, 490, 492, 525, 0
    ### Primary display => ConnectorId = 21, Resolution = 800x480
    failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
    failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
    loaded module : gbm_pvr.so
    found valid GBM backend : gbm_pvr.so
    Using display 0x1 with EGL version 1.4
    EGL Version "1.4 build 1.14@3699939 (MAIN)"
    EGL Vendor "Imagination Technologies"
    EGL Extensions "EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_cl_image EGL_KHR_fence_sync EGL_IMG_context_priority EGL_IMG_hibernate_process EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_KHR_create_context EGL_WL_bind_wayland_display"
    ^CHandling signal number = 2
    Cleanup of GL, GBM and DRM completed
    root@am335x-evm:~# gles1test1
    root@am335x-evm:~# gles2test1
    root@am335x-evm:~# services_test
    ----------------------- Start -----------------------
    Try calling PVRSRVConnect with an invalid argument:
    PVR:(Error): PVRSRVConnect: Invalid connection. [0, ]
    PVR:(Error): PVRSRVConnect: Unable to open connection. [0, ]
    OK
    Call PVRSRVConnect with a valid argument:
    OK
    Try calling PVRSRVEnumerateDevices with invalid puiNumDevices:
    PVR:(Error): PVRSRVEnumerateDevices: Invalid params [0, ]
    OK
    Get number of devices from PVRSRVEnumerateDevices:
    OK
    .... Reported 1 devices
    .... Device Number | Device Type
    0000 | PVRSRV_DEVICE_ID_SGX
    Attempt to acquire device 0:
    OK
    Getting SGX Client info
    OK
    .... ui32ProcessID:905
    Attempt to create memory context for SGX:
    OK
    Display Class API: enumerate devices
    OK
    PVRSRVEnumerateDeviceClass() returns 0 display device(s)
    FAIL - PVRSRV_ERROR_NO_DC_DEVICES_FOUND

    Thank You,
    Ludwig
  • Hello Yordan,


    do you need some further information? Do you get the same behavior?

    Regards,

    Ludwig

  • Hi Ludwig,

    I've contacted the design team on this. I will get back to you as soon as I have feedback from them (or they will post directly here).

    Best Regards,
    Yordan
  • Hello,


    it's been a while since your last post. Are there any updates?

    Best regards,

    Ludwig

  • Hi Ludwig,

    I've not received any feedback yet. I've sent a reminder to the OpenGL/QT experts.. I will post their feedback here, when I get any.

    Best Regards,
    Yordan
  • Ludwig Zenz said:
    ./cube --platform eglfs  --> !display remains dark!

    This example is broken for AM335x and AM437x platform. It works on AM57x. We are investigating. Rest other example should work with eglfs QPA withour weston.

  • Ludwig Zenz said:
    I added 'WindowSystem=libpvrDRMWSEGL.so' to /etc/powervr.ini.

    It is good to add, but no longer required. If this environment is set,  the DDK will try the specified one at first, otherwise, it will try the window systems in the order of libpvrws_WAYLAND.so, libpvrGBMWSEGL.so and libpvrDRMWSEGL.so.

    Where
    libpvrws_WAYLAND.so: Wayland client (QT application)
    libpvrGBMWSEGL.so: Wayland Server (Weston), eglfs_kms
    and libpvrDRMWSEGL.so : EGLFS

  • Ludwig Zenz said:
    To Compile fo EGLFS i had to add libwayland-server to my sysroot. Any Idea why this is the case?

    The QT EGLFS support is included at the PSDK file system. The libwayland-server.so is required for wayland build and it has nothing to do with eglfs. What exactly are you trying to do?

     

    Ludwig Zenz said:
    services_test --> not ok

    All the following SGX standard test programs will no longer work as they are fbdev based and . From DDK 1.9, DDK 1.14, we switched to DRM based window system. 

    - sgx_init_test

    - sgx_blit_test

    - sgx_clipblit_test

    - sgx_flip_test

    - sgx_render_flip_test

    - gles1_texture_stream

    - gles2_texture_stream

    - pvr2d_test

    - services_test

  • Hello Manisha,

    thank you very much for your response.

    What I need to do?

    - run Qt5 WebEngine (Qt Quick2 implementation) with sgx enabled (platform plugin eglfs) on a Debian 8 based system (without x11, without wayland).

    Why I had to add libwayland-server.so.0:

    root@am335x-evm:/usr/lib# ldd libpvrDRMWSEGL.so

           linux-vdso.so.1 (0xbef81000)

           libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb6f10000)

           libgbm.so.2 => /usr/lib/libgbm.so.2 (0xb6efe000)

           libudev.so.1 => /lib/libudev.so.1 (0xb6ed3000)

           libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0xb6eb7000)

           libdrm_omap.so.1 => /usr/lib/libdrm_omap.so.1 (0xb6ea5000)

           libffi.so.6 => /usr/lib/libffi.so.6 (0xb6e8e000)

           libdbm.so.1 => /usr/lib/libdbm.so.1 (0xb6e7c000)

           libsrv_um.so.1 => /usr/lib/libsrv_um.so.1 (0xb6e43000)

           libpthread.so.0 => /lib/libpthread.so.0 (0xb6e2f000)

           libc.so.6 => /lib/libc.so.6 (0xb6d41000)

           /lib/ld-linux-armhf.so.3 (0x7f574000)

           libm.so.6 => /lib/libm.so.6 (0xb6ccc000)

           libcap.so.2 => /lib/libcap.so.2 (0xb6cb9000)

           librt.so.1 => /lib/librt.so.1 (0xb6ca3000)

           libresolv.so.2 => /lib/libresolv.so.2 (0xb6c83000)

           libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6c59000)

           libdl.so.2 => /lib/libdl.so.2 (0xb6c46000)

           libattr.so.1 => /lib/libattr.so.1 (0xb6c32000)

     

    Some further questions which i could no answer myself:

    Do i need to specify QT_QPA_EGLFS_INTEGRATION = eglfs_kms in qmake.conf?

    Do i really need libgbm.so.2 ?

     

    Regards,

    Ludwig

     

  • Hello Manisha,

    i received info about a new version of the Processor SDK.

    Do you think there is a solution for this issue included? I did not find a matching entry in the release notes.

    Did you have the time to have a look at the questions in my previous post?



    Regards,
    Ludwig

  • Hello Manisha,


    are there some updates on this issue?

    Is it possible to answer my questions?

    Thank You!

    Ludwig

  • Ludwig Zenz said:
    Why I had to add libwayland-server.so.0:

    The dependency is coming from the library libdbm.so.1 which is provided by SGX DDK. 

     

    #:~/targetfs/am437x/usr/lib$ objdump -p libdbm.so.1 | grep NEEDED

      NEEDED               libdrm.so.2

      NEEDED               libgbm.so.2

      NEEDED               libudev.so.1

      NEEDED               libwayland-server.so.0

      NEEDED               libdrm_omap.so.1

      NEEDED               libffi.so.6

      NEEDED               libdl.so.2

      NEEDED               libc.so.6

  • Ludwig Zenz said:
    - run Qt5 WebEngine (Qt Quick2 implementation) with sgx enabled (platform plugin eglfs) on a Debian 8 based system (without x11, without wayland).

    Are you meaning to say that you want to run Qt5 WebEngine with SGX enabled and without wayland/x11 that is eglfs mode and you are facing some issues? What kind of problem are you facing? Please clarify exact problem as it's not very clear from your posts above. 

  • Thank you for your response. Sorry for the delay, I was on vacation.


    My answers to your questions:

    "Are you meaning to say that you want to run Qt5 WebEngine with SGX enabled and without wayland/x11 that is eglfs mode and you are facing some issues?"

    - Yes!

    "What kind of problem are you facing?"

    - Complete screen turns white.

    Can you answer the following questions?

    "Do i need to specify QT_QPA_EGLFS_INTEGRATION = eglfs_kms in qmake.conf?"

    "Can you provide a list, which contains the librarys from the DDK which are needed for eglfs operation (without wayland/x11 stuff)?"

    Regards,

    Ludwig

  • Can you try this on Proc SDK 2.00.01? At that point in time we supported ONLY eglfs as we had not yet integrated Wayland for AM335x. If that works (or perhaps as an alternative test), you can rebuild the file system without Wayland support by following these directions:

    e2e.ti.com/.../1509382
  • Have you tried below example? It works great using PSDK 3.1.
    /usr/share/qt5/examples/webenginewidgets/demobrowser/demobrowser -platform eglfs
  • Hello Manisha,


    the demobrowser is based on widgets. It works on my setup, too.

    But demos like "cube" and my own QtQuick based Webengine-Browser are still not working. Please have a look a my initial post.

    Thank You,

    Ludwig

  • Hello Brad,

    i did a build of Qt5.6.2 with the librarys of SDK 2.00.01. Still the same. Platform eglfs + Qt Widgets does work. Platform eglfs + QtQuick does not work.

    Compiling was no problem.

    Can you tell me if the Qt5 demo "cube" is working on your device?

    Thank You,
    Ludwig
  • Hi Ludwig,

    Sorry, I didn't update you on the investigation results. The Imagination team updated us that  "cube" demo not working on AM335x is an expected behavior due to SGX530 limitation. Below is there response -

    According to the OpenGL ES 2.0 specification - you can only have a non-power of texture for level zero of a MIPmap as stated below:
    If level is greater than zero, and either width or height is not a power of two, the error INVALID_VALUE is generated. (glTexImage2D)
    This line is explicitly removed in the GL_OES_texture_npot extension, which is available for the SGX544, but cannot be supported on the SGX530.

    Not sure if your own QtQuick based demo is also falling under this problem. 

    Regards,

    Manisha

  • Hello Manisha,

    after your latest post i restart with a clean environment and used the libraries from SDK 02.00.01. And i had success. Yes!!

    I must have messed up something between changing from SDK 02.00.02 to SDK 02.00.01 and I didn't get why this "cube" Demo was broken. I though it was just the build itself in the sdk, now i understand.

    For everyone who needs Qt5 eglfs with SGX on a Debian 8 system the libdrm2 and libdrm-omap1 libraries from Debian 8 can be used with the libraries of SDK 02.00.01. Not the newest versions but seem to be ok.

    Thank you for supporting.

    Regards,
    Ludwig
  • I also have faced the almost same issue, I did a build with QT5.5.1 and SDK-02.00.02.11 without wayland or kms. and then run the demos from Qt source with eglfs plugin, Qt Widgets does work totally, and partial QtQuick demos in the directory "qtquickcntrols/examples/" does work such as "controls/styles" and "extras/dashboard", and other demos can run, but display white and miss lots of elements on screen.
    i think there is something wrong with configuration or setting with environment, but didn't find the root cause currently.
    any ideas?
    Thanks a lot!
  • I'm not sure if I can help:
    • I am using UM-DDK from SDK 02.00.01
    • I have updated to QT5.7.1
    • I am not using Yocto, our system is Debian 8 based

    I have tested the examples you mentioned and others from quickcontrols. They seem to be all right.


    I few things i would consider:

    • Some must be started from their directory. (I mistake I made some time ago)
    • Always pass "--platform eglfs"
    • Check if you copied all resources (*.png, ...) to the target.
    • Check libjpeg oder libpng (or similar) if the *.png, *.jpg content is missing

    Regards,

    Ludwig

  • hi Ludwig,

    I copy all resources for demo to the target, and also copy all QT lib, plugins and qml to target. and set QT_QPA_PLATFORM="eglfs". I think my environment setting is OK. when i run the example with the directory for "qt5.5.1_src/qtquickcontrols/examples/quick/extra/flat", the loading windows is ok, then enter the main window, the text and icons for toolbar didn't show, but we could click them to enter menu, and the text of menu also can't show.

    BTW: If i change the SDK 02.00.02 to 02.00.01, whether i have to rebuild kernel to make them compatible or not? 

    Currently, i do my build with QT 5.5.1 and SDK-02.00.02.11 based on Ubuntu 14.0.4-64bit.

    Could you check my configuration options for QT?

    Here is my configuration for QT:

    ./configure -prefix /usr/local/qt5_install -v -opensource -confirm-license -opengl es2 -release -make libs -nomake examples -nomake tools -nomake tests -device linux-TIarmv7-sgx-g++ -device-option CROSS_COMPILE=/opt/ti-processor-sdk-linux-am335x-evm-02.00.02.11/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- -sysroot /opt/ti-processor-sdk-linux-am335x-evm-02.00.02.11/linux-devkit/sysroots/cortexa8hf-vfp-neon-linux-gnueabi -force-pkg-config -eglfs -no-gstreamer -skip qtmultimedia -skip qtwebengine

    and get below build options:

     Configuration .......... accessibility alsa audio-backend c++11 clock-gettime clock-monotonic compile_examples concurrent cross_compile dbus egl eglfs enable_new_dtags evdev eventfd freetype full-config getaddrinfo getifaddrs harfbuzz iconv icu inotify ipv6ifname large-config largefile libudev linuxfb medium-config minimal-config mremap nis opengl opengles2 openssl pcre png posix_fallocate precompile_header qpa qpa reduce_exports release rpath shared small-config system-jpeg system-png system-zlib

     Build parts ............  libs

     Mode ................... release

     Using sanitizer(s)...... none

     Using C++11 ............ yes

     Using gold linker....... no

     Using new DTAGS ........ yes

     Using PCH .............. yes

     Target compiler supports:

       Neon ................. no

    Qt modules and options:

     Qt D-Bus ............... yes (loading dbus-1 at runtime)

     Qt Concurrent .......... yes

     Qt GUI ................. yes

     Qt Widgets ............. yes

     Large File ............. yes

     QML debugging .......... yes

     Use system proxies ..... no

    Support enabled for:

     Accessibility .......... yes

     ALSA ................... yes

     CUPS ................... no

     Evdev .................. yes

     FontConfig ............. no

     FreeType ............... yes (bundled copy)

     Glib ................... no

     GStreamer .............. no

     GTK theme .............. no

     HarfBuzz ............... yes (bundled copy)

     Iconv .................. yes

     ICU .................... yes

     Image formats:

       GIF .................. yes (plugin, using bundled copy)

       JPEG ................. yes (plugin, using system library)

       PNG .................. yes (in QtGui, using system library)

     journald ............... no

     libinput................ no

     mtdev .................. no

     Networking:

       getaddrinfo .......... yes

       getifaddrs ........... yes

       IPv6 ifname .......... yes

       libproxy.............. no

       OpenSSL .............. yes (loading libraries at run-time)

     NIS .................... yes

     OpenGL / OpenVG:

       EGL .................. yes

       OpenGL ............... yes (OpenGL ES 2.0+)

       OpenVG ............... no

     PCRE ................... yes (bundled copy)

     pkg-config ............. yes

     PulseAudio ............. no

     QPA backends:

       DirectFB ............. no

       EGLFS ................ yes

         EGLFS i.MX6....... . no

         EGLFS KMS .......... no

         EGLFS Mali ......... no

         EGLFS Raspberry Pi . no

         EGLFS X11 .......... no

       LinuxFB .............. yes

       XCB .................. no

     Session management ..... yes

     SQL drivers:

       DB2 .................. no

       InterBase ............ no

       MySQL ................ no

       OCI .................. no

       ODBC ................. no

       PostgreSQL ........... no

       SQLite 2 ............. no

       SQLite ............... yes (plugin, using bundled copy)

       TDS .................. no

     tslib .................. no

     udev ................... yes

     xkbcommon-x11........... no

     xkbcommon-evdev......... no

     zlib ................... yes (system library)

  • Hello Bob,

    as far as i can see your Qt5 configuration looks okay.

    If your plan is to stay with the TI SDK i would think about building Qt5 with Yocto (like already done by TI):
    processors.wiki.ti.com/.../Processor_SDK_Building_The_SDK

    Regards,
    Ludwig
  • OK, will rebuild QT with SDK 02.00.01.07 and same configuration

    Thanks.