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.

Linux/BEAGLEBOARD-X15: Powervr Drivers and Ti2016.05-rc4 Kernel

Part Number: BEAGLEBOARD-X15

Tool/software: Linux

Hi, 

I'm using 4.4 kernel from ti (ti-linux-4.4.y branch starting from tag ti2016.05-rc4)

We use buidsystem yocto and included the sgx drivers from powervr using meta-ti layer (also tag ti2016.05-rc4)  and recipes for ddk-um and 

ti-sgx-ddk-um_1.14.3699939.bb -> using revision: SRCREV = "fccafce7d0a023e36c064ccbaa7d33e89252ea00"

ti-sgx-ddk-km_1.14.3699939.bb -> using revision: SRCREV = "e68719ba7c54602c710b6615cd665f5b7f47f85e"

When starting an QT application natively using -platform eglfs, the following happens:

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
PVR:(Error): [ 416-> 416] < gbm_pvr_create_device():487|ERROR> Failed to create DBM device: No such device [0, ]
Could not create GBM device (No such device)
Could not open device /dev/dri/card1 - aborting!
Aborted (core dumped)


It tries to open card1; which is according to dmesg mapped to PVR / SGX.. (See DMESG below)

root@wa55-am57xx:~# ls /dev/dri/
card0 card1 controlD64 renderD128 renderD129

when i remove card1, and create a link from card0 and name it card1, it works with -platform eglfs, but this is not the SGX core beeing used..
Do you know what this error means and what i'm doing wrong? 

i found some other posts but they didn't help me with this (e.g.  https://e2e.ti.com/support/arm/sitara_arm/f/791/p/495108/1789340 )

This is dmesg outputting (what i think is relevant for this item); 

root@wa55-am57xx:~# dmesg | grep drm
[ 1.805660] [drm] Initialized drm 1.1.0 20060810
[ 2.271767] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 2.278736] [drm] No driver support for vblank timestamp query.
[ 2.324275] [drm] Enabling DMM ywrap scrolling
[ 2.351610] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
[ 2.384780] [drm] Initialized omapdrm 1.0.0 20110917 on minor 0
[ 10.968839] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
root@wa55-am57xx:~# dmesg | grep PVR
[ 12.267833] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]

[ 1.825456] omapdss_dispc 58001000.dispc: OMAP DISPC rev 5.1

[ 1.825696] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)

LSMOD:

root@wa55-am57xx:~# lsmod
Module Size Used by
usbhid 29115 0
usb_storage 48073 0
bc_example 7417 0
xhci_plat_hcd 5368 0
xhci_hcd 126133 1 xhci_plat_hcd
leds_gpio 4138 0
led_class 6306 1 leds_gpio
pvrsrvkm 410719 1 bc_example
phy_omap_usb2 5644 2
dwc3 91269 0
udc_core 13451 1 dwc3
rtc_palmas 5436 0
extcon_palmas 6754 0
dwc3_omap 5175 0
ti_soc_thermal 23827 0
extcon 14430 3 dwc3,extcon_palmas,dwc3_omap
rtc_omap 8521 0
rtc_ds1307 9322 0

Info:

Full DMESG log: pastebin.com/GeKK3uNf

  • Just to be sure, you are talking about TI TMDSEVM572X, our EVM correct? Thanks for your post. I am escalating it.
  • Thanks for the reply, Yes and No. We are using this EVM but without the display and attached a screen directly via HDMI. 

  • Thanks. apps team will be replying soon...
  • Are you able to run weston or kmscube?

    Please refer to below wiki page and  disable eglfs_kms by setting the environment variable QT_QPA_EGLFS_INTEGRATION=none and check if you still see the same issue -

    http://processors.wiki.ti.com/index.php/Processor_Linux_SDK_Graphics_and_Display#Migration_Guide_from_Processor_SDK_3.1_to_3.x_for_AM3.2F4.2F5

  • Hi Manisha,

    we didn't tried weston since we don't want to use anything else than eglfs directly. i can try for you but the link you reffer to seems blocked for me:

    You don't have permission to access "processors.wiki.ti.com/.../Processor_Linux_SDK_Graphics_and_Display" on this server.
    
    Reference #18.e202655f.1484552147.509f63b2

    KmsCube does work (copied binary from TI-SDK evm rootfs directly) and launched (first QT5 application wit -platform eglfs (wich fails), next kmscube directly); 

    root@wa55-am57xx:~# helloworld -platform eglfs
    failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: [  126.678792] audit: type=1701 audit(1482392670.769:2): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=333 comm="helloworld" exe="/usr/sbin/helloworld" sig=6
    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
    PVR:(Error): [  333->  333] <              gbm_pvr_create_device():487|ERROR> Failed to create DBM device: No such device [0, ]
    Could not create GBM device (No such device)
    Could not open device /dev/dri/card1 - aborting!
    Aborted (core dumped)
    root@wa55-am57xx:~# kmscube 
    trying to load module omapdrm...success.
    [  132.913342] omapdss error: HDMI I2C Master Error
    ### Display [0]: CRTC = 34, Connector = 32
    	Mode chosen [1024x768] : Clock => 65000, Vertical refresh => 60, Type => 64
    	Horizontal => 1024, 1048, 1184, 1344, 0
    	Vertical => 768, 771, 777, 806, 0
    ### Primary display => ConnectorId = 32, Resolution = 1024x768
    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 EGL_EXT_image_dma_buf_import"
    

    But as you can see KMScube also uses Display 0 which (from my view) is omapDSS display and not PVR display as seen in dmesg:

    [ 2.384780] [drm] Initialized omapdrm 1.0.0 20110917 on minor 0
    [ 10.968839] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1

    I tried to use the  QT_QPA_EGLFS_INTEGRATION=none ; but it makes no difference..

    QMAKE Configuration; 

  • Regarding your access to the wiki above, please try to access it outside your company firewall, because that wiki is in public area.

  • Wiki:
    Still, from my home (without firewall) and with external line at company office this doesn't work. perhaps if you can save it as PDF and email me (stef.boerrigter@bench.com) then i can have a look? 

  • Jeff,
    Done, just sent to you from my TI corporate email. Sorry for the trouble in opening that page....I am checking with other people to see if there is something wrong with it...
  • Thanks, i received it and i did see this content before somewhere.
    For the record; i'm not using TI SDK, but native (Yocto -> Meta-ti + meta-qt5 layers to build both sgx (as stated in opening post) and QT5).

    Setting the QT_QPA_EGLFS_INTEGRATION=none doesn't help
  • Stef....ok, for here, I will let Manisha and our apps team to take care of you....thanks for reporting back.
  • Can you please run below SGX 3D demo and share with us your log?

    #/usr/bin/SGX/demos/Raw/OGLES2ChameleonMan

    I wasn't able to download other file that you shared. Please attach that file with the post. 

  • Running the raw demo works fine (i get an I2C error on HDMI but that's known);

    root@wa55-am57xx:~# /usr/bin/SGX/demos/Raw/OGLES2ChameleonMan &
    [1] 355
    root@wa55-am57xx:~# [ 279.666962] omapdss error: HDMI I2C Master Error
    PVRShell: EGL 1.4 initialized

    Regarding the File that was missing, i think you are reffering to links to PasteBin of my QMake Configuration for QT5.6:
    http://pastebin.com/ijPaS9fD  

    Stef.

  • Hi Stef,

    Can you please share the logs from the working chameleon demo?

    Please also share the list of directories/files under /usr/lib/qt5/plugins/ on your target filesystem.

    I am not able to access the pastebin.com site. It's blocked to access within TI network. Please share it as attachment or copy-paste the content.

    Regards,
    Manisha
  • Hi Manisha,

    I think i uploaded it as a text file now.
    Regarding logs for the working demo, it doesn't output more to the console then: just PVRShell: EGL 1.4 initialized. i do attach a dmesg file to this post which is generating a lot of DISPC output.7026.DMESG_OGLES2Demo.txt

    Here is the list of files you requested in /usr/lib/qt5/plugins/

    root@wa55-am57xx:/usr/bin/SGX/demos/Raw# ls /usr/lib/qt5/plugins/
    audio                  generic                platforminputcontexts  qmltooling
    bearer                 imageformats           platforms              sqldrivers
    egldeviceintegrations  mediaservice           playlistformats        video
    root@wa55-am57xx:/usr/bin/SGX/demos/Raw# ls /usr/lib/qt5/plugins/*
    /usr/lib/qt5/plugins/audio:
    libqtaudio_alsa.so
    
    /usr/lib/qt5/plugins/bearer:
    libqconnmanbearer.so  libqgenericbearer.so  libqnmbearer.so
    
    /usr/lib/qt5/plugins/egldeviceintegrations:
    libqeglfs-kms-integration.so
    
    /usr/lib/qt5/plugins/generic:
    libqevdevkeyboardplugin.so  libqevdevtouchplugin.so     libqtuiotouchplugin.so
    libqevdevmouseplugin.so     libqlibinputplugin.so
    libqevdevtabletplugin.so    libqtslibplugin.so
    
    /usr/lib/qt5/plugins/imageformats:
    libqgif.so   libqico.so   libqjpeg.so
    
    /usr/lib/qt5/plugins/mediaservice:
    libgstaudiodecoder.so  libgstcamerabin.so     libgstmediacapture.so  libgstmediaplayer.so
    
    /usr/lib/qt5/plugins/platforminputcontexts:
    libibusplatforminputcontextplugin.so
    
    /usr/lib/qt5/plugins/platforms:
    libqeglfs.so       libqlinuxfb.so     libqminimal.so     libqminimalegl.so  libqoffscreen.so
    
    /usr/lib/qt5/plugins/playlistformats:
    libqtmultimedia_m3u.so
    
    /usr/lib/qt5/plugins/qmltooling:
    libqmldbg_debugger.so   libqmldbg_local.so      libqmldbg_profiler.so   libqmldbg_tcp.so
    libqmldbg_inspector.so  libqmldbg_native.so     libqmldbg_server.so
    
    /usr/lib/qt5/plugins/sqldrivers:
    libqsqlite.so
    
    /usr/lib/qt5/plugins/video:
    videonode
    root@wa55-am57xx:/usr/bin/SGX/demos/Raw# ls /usr/lib/qt5/plugins/*/*
    /usr/lib/qt5/plugins/audio/libqtaudio_alsa.so
    /usr/lib/qt5/plugins/bearer/libqconnmanbearer.so
    /usr/lib/qt5/plugins/bearer/libqgenericbearer.so
    /usr/lib/qt5/plugins/bearer/libqnmbearer.so
    /usr/lib/qt5/plugins/egldeviceintegrations/libqeglfs-kms-integration.so
    /usr/lib/qt5/plugins/generic/libqevdevkeyboardplugin.so
    /usr/lib/qt5/plugins/generic/libqevdevmouseplugin.so
    /usr/lib/qt5/plugins/generic/libqevdevtabletplugin.so
    /usr/lib/qt5/plugins/generic/libqevdevtouchplugin.so
    /usr/lib/qt5/plugins/generic/libqlibinputplugin.so
    /usr/lib/qt5/plugins/generic/libqtslibplugin.so
    /usr/lib/qt5/plugins/generic/libqtuiotouchplugin.so
    /usr/lib/qt5/plugins/imageformats/libqgif.so
    /usr/lib/qt5/plugins/imageformats/libqico.so
    /usr/lib/qt5/plugins/imageformats/libqjpeg.so
    /usr/lib/qt5/plugins/mediaservice/libgstaudiodecoder.so
    /usr/lib/qt5/plugins/mediaservice/libgstcamerabin.so
    /usr/lib/qt5/plugins/mediaservice/libgstmediacapture.so
    /usr/lib/qt5/plugins/mediaservice/libgstmediaplayer.so
    /usr/lib/qt5/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so
    /usr/lib/qt5/plugins/platforms/libqeglfs.so
    /usr/lib/qt5/plugins/platforms/libqlinuxfb.so
    /usr/lib/qt5/plugins/platforms/libqminimal.so
    /usr/lib/qt5/plugins/platforms/libqminimalegl.so
    /usr/lib/qt5/plugins/platforms/libqoffscreen.so
    /usr/lib/qt5/plugins/playlistformats/libqtmultimedia_m3u.so
    /usr/lib/qt5/plugins/qmltooling/libqmldbg_debugger.so
    /usr/lib/qt5/plugins/qmltooling/libqmldbg_inspector.so
    /usr/lib/qt5/plugins/qmltooling/libqmldbg_local.so
    /usr/lib/qt5/plugins/qmltooling/libqmldbg_native.so
    /usr/lib/qt5/plugins/qmltooling/libqmldbg_profiler.so
    /usr/lib/qt5/plugins/qmltooling/libqmldbg_server.so
    /usr/lib/qt5/plugins/qmltooling/libqmldbg_tcp.so
    /usr/lib/qt5/plugins/sqldrivers/libqsqlite.so
    
    /usr/lib/qt5/plugins/video/videonode:
    libeglvideonode.so
    

    Kind Regards,

    Stef.

    5468.QMake_options.txt

  • Hi Manisha, 

    Any update from your side?

    Kind Regars, Stef.

  • Hi Stef,

    Does your build procedure include meta-processor-sdk? All QT/gbm related patches are there.

    Also, looks like your build has default configuration of eglfs_kms plugin and that plugin has some known issues, so for debugging purpose now, disable eglfs_kms by adding below line to qt_env.sh

    export QT_QPA_EGLFS_INTEGRATION=none

    Please share with us log for QT eglfs (without kms)

    root@am57xx-evm:~# export QT_QPA_EGLFS_INTEGRATION=none

    root@am57xx-evm:~# /usr/share/qt5/examples/widgets/painting/deform/deform -platform eglfs

    Unable to query physical screen size, defaulting to 100 dpi.

    To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).

  • meta-processor-sdk is not part of our build.
    A quick attempt to add the layer (master branch) resulted in numerous errors/issues. Could you give insights in what patches are required for us? (since the versioning for this layer is also not equal to current Yocto versioning / branches / tags).

    The QT_QPA_EGLFS_INTEGRATION=none fixed the issue requiring a symlink of card0 to card1.
    It now runs without any modifcation to the devices. See tests below.
    (There is however no difference in cpu load)

    When pressing the "Use OpenGL" button the following crash occurs:
    EGLFS: OpenGL windows cannot be mixed with others.
    Aborted (core dumped)

    Was this the expected performance / result ?

    ---------------------------------------------------------------------------------------------------
    # Test 1:
    ---------------------------------------------------------------------------------------------------

    export QT_QPA_PLATFORM=eglfs
    export QT_QPA_EGLFS_INTEGRATION=none
    export QT_QPA_EGLFS_PHYSICAL_HEIGHT=135.60
    export QT_QPA_EGLFS_PHYSICAL_WIDTH=152.50

    cd /usr/share/qt5/examples/widgets/painting/deform
    ./deform -platform eglfs
    qt.qpa.input: X-less xkbcommon not available, not performing key mapping

    --> CPU Usage 20-30%

    ---------------------------------------------------------------------------------------------------
    # Test 2:
    ---------------------------------------------------------------------------------------------------

    --> Changing Lens Radius to MAX, Deformation to MAX, Font Size to MIN
    --> CPU Usage 50%
  • stef boerrigter said:
    A quick attempt to add the layer (master branch) resulted in numerous errors/issues. Could you give insights in what patches are required for us? (since the versioning for this layer is also not equal to current Yocto versioning / branches / tags).

    Please check this wiki page - 

    stef boerrigter said:
    When pressing the "Use OpenGL" button the following crash occurs:
    EGLFS: OpenGL windows cannot be mixed with others.
    Aborted (core dumped)

    Which application are you running here?

    stef boerrigter said:

    export QT_QPA_PLATFORM=eglfs
    export QT_QPA_EGLFS_INTEGRATION=none
    export QT_QPA_EGLFS_PHYSICAL_HEIGHT=135.60
    export QT_QPA_EGLFS_PHYSICAL_WIDTH=152.50

    Are these settings applicable to both the test cases?

    stef boerrigter said:
    cd /usr/share/qt5/examples/widgets/painting/deform
    ./deform -platform eglfs
    qt.qpa.input: X-less xkbcommon not available, not performing key mapping

    What is this warning about? Is X11 included?

    stef boerrigter said:
    --> CPU Usage 20-30%

    What are the settings of Radius, Deformation and FONT Size?

  • We shall have a look at the Processor SDK wiki, we are using our own SDK based on TI more or less but we shall try to leverage from it.

    regarding the other remarks:

    manisha said:
    stef boerrigter
    When pressing the "Use OpenGL" button the following crash occurs:
    EGLFS: OpenGL windows cannot be mixed with others.
    Aborted (core dumped)

    Which application are you running here?

    Deform (as you suggested), when pressing the "Use OpenGL" button it crashes with that message beeing printed out.

    manisha said:
    stef boerrigter

    export QT_QPA_PLATFORM=eglfs
    export QT_QPA_EGLFS_INTEGRATION=none
    export QT_QPA_EGLFS_PHYSICAL_HEIGHT=135.60
    export QT_QPA_EGLFS_PHYSICAL_WIDTH=152.50

    Are these settings applicable to both the test cases?

    Yes, they apply to both the tests.

    manisha said:
    stef boerrigter
    cd /usr/share/qt5/examples/widgets/painting/deform
    ./deform -platform eglfs
    qt.qpa.input: X-less xkbcommon not available, not performing key mapping

    What is this warning about? Is X11 included?

    No X11 or other windowing system is included. we use a touch screen and input from it works.

    manisha said:

    stef boerrigter

    --> CPU Usage 20-30%

    What are the settings of Radius, Deformation and FONT Size?

    Default for starting the application. 

  • Which deform application are you running? The one that comes in PLSDK filesystem under /usr/share/qt5/examples/widgets/painting/deform/deform doesn't show any "Use OpenGL" button. No crash seen after clicking the button like "Show Source" etc on deform application supported by PLSDK filesystem
  • We grabbed the sources from the QT examples dir and compiled for ourselfes (sources like https://github.com/qt/qtbase/tree/dev/examples/widgets/painting/deform )

    When running the deform from the TI sdk (grabbed from the pre-compiled TI-SDK-Filesystem) we don't see such a button, but now load is around 50% CPU with all the parameters slided to the max (Lens Radius MAX, Font Size Max and Deformation MAX). This indicates not much opengl happening from my perspective.

    This binary (TI-SDK Deform )gives no other output compared to previous deform (self compiled application) output. 

  • Hi Stef,

     The QtWidget examples use software rendering and no openGL is involved there. Traditional QWidget based painting aren't accelerated, unless QOpenGLPaintDevice is used.

    Refer to the following documents.

    http://wiki.qt.io/Qt5GraphicsOverview

    QPaint: use software randering

    QML: use openGL (openGLES)

    Please note that QT also supports a new Class QOpenGLWidget which invokes hardware acceleration. http://doc.qt.io/qt-5/qopenglwidget.html

    What's your use case? You may want to try some QML examples. 

  • Hi Manisha,

    The reason we posted the results to these demo's was that you asked us to run them and post results, i think we are drifting a bit form the original question which is QT + OpenGL + SGX support.

    Kind Regards, 
    Stef.

  • Stef,

    I understood from your earlier response that disabling eglfs_kms resolved the problem and now you wanted to sort the performance issue. Are you still facing issue running the demos with eglfs?

    As I said earlier, please build the PSDK from Arago following the build steps mentioned in the wiki page that I shared earlier and then install the packages from there to your filesystem or use the generated filesystem.

    Regards,
    Manisha
  • Hi Manisha, 

    We used the exports, and we can confirm that they help resolve the problem we have as before, we are just not yet 100% confident that QT and Opengl Integration are now working fully.

    We tried running the CUBE example from Qt and while spinning the cube fastly the cpu load is verly low so that indicates that at least somethings are going wel.

    Do you have a suggestion how we can check how successfull our chain of [SGX - Drivers - Opengl - QT] is?

    In the background we are looking at the Arago/Ti-sdk build to check for usefull additions / differences.

    Thanks for your help.

  • stef boerrigter said:
    We used the exports, and we can confirm that they help resolve the problem we have as before, we are just not yet 100% confident that QT and Opengl Integration are now working fully.

    Not all GPU operations are going to be faster than CPU. The GPU benefits will typically for -

    a. Large window (at least 64x64) & lot of operations
    b. Composition
    c. Vector operation on a large data set
    d. Transformations - rotation, scale, translate, affine transforms
    e. How infrequently do the index buffers change between frames

    stef boerrigter said:
    Do you have a suggestion how we can check how successfull our chain of [SGX - Drivers - Opengl - QT] is?

    You can try using one of these tools to check the loading on SGX - 

    http://processors.wiki.ti.com/index.php/Processor_Linux_SDK_Graphics_and_Display#Using_the_PowerVR_Tools