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/AM5708: GPU output capture

Part Number: AM5708

Tool/software: Linux

Hi, 
We are using the AM5708 with Linux but without an Windowing system. 
There is a usecase where the customer would like to use VNC or remote viewing of the status of the device. 

Since we are not using X things like VNC are not that trivial. 
Now whe where thinking about grabbing the output of the GPU (buffer?) and save it as a screenshot or stream it outside of the device via the network connection somehow.
I did some searching and found some things about gralloc but i'm not familliar with it and if it is suitable.

Could you provide us with hints weather this is a valid path and worth the effort or better to search for alternatives?

  • The software team have been notified. They will respond here.
  • Hi Stef,

    Sorry for delayed response. Gralloc is applicable only to android OS.

    Could you let us know your current rendering flow? What EGL is being used and how is the rendering buffer being allocated?
  • Hi, Thanks for the update,

    Our rendering flow is:

    - using an 4.4 kernel (TI 4.4.41 - sdk 03.03.00.04 )  with:

    - graphics drivers:  ti-sgx-ddk-um_1.14.3699939 & ti-sgx-ddk-um_1.14.3699939 

    - openGL 2 ES 

  •  You can get access to GPU rendered buffer on host side and then you can do any processing on it as you like. Let me know if below links helps.

  • Thanks for your answer, We have looked into this,
    It doesn't fullfill our needs yet.
    When looking into cross-post: e2e.ti.com/.../615458
    we see that there is a similar approach.
    we tried to grab the screen using
    "
    funcs->glReadPixels(0, 0, width, height,
    GL_RGBA, GL_UNSIGNED_BYTE, pBytes);
    "
    but we get an PVR error: PVR:(Error): glReadPixels: Failed to get strided data [0, ]

    So we have 2 questions:
    1. How to use QT and glReadPixels correctly
    2. Is there any chance to use PBO within this SOC?
  • For glReadPixels error, can you let us know if you are using elgfs or eglfs_kms QPA?  If you are using eglfs, can you try using eglfs_kms QPA. If you still see the error with eglfs_kms QPA, can you share unit test bench using which we can replicate the issue at our end?

  • stef boerrigter said:
    2. Is there any chance to use PBO within this SOC?

    PBO’s are not supported in GLES2.0 so they can’t be used on AM57x device.

  • Hi,

    We are using eglfs iso eglfs_kms which is not available on our platform:

    this application failed to start because it coul[  102.796828] audit: type=1701 audit(1513678633.839:2): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=284 comm="vnctest" exe="/home/root/vnctest" sig=6
    d not find or load the Qt platform plugin "eglfs_kms"
    in "".
    
    Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.
    
    Reinstalling the application may fix this problem.
    

    see attached tar for sourcesopengl.tar.gz

  • Hi Stef,

    We tested your application with eglfs_kms QPA and it works well. There is bug with nullDRM egl layer that causes this glReadPixel() error. We tried quick hack in the egl layer to fix this glReadPixel() error and with that patch we don't see any error running your application.

    We expect the bug fix in NULL DRM egl layer to be available in 2Q, 2018 Processor SDK Linux release.
  • Hi Manisha,

    Thanks for your effort!

    I have a couple of questions to follow up this issue:

    1. The bugfix for Q2 (i expect it then soon / e.g. before july 2018) shall it be fixed in the PVR drivers? (so an update for ti-sgx-ddk binary blobs?)

    2. is it an option for us to switch from QPA: eglfs to eglfs_kms ?

    1. What would be (possible) downsides?

    2. before you pointed us from eglfs_kms -> eglfs ( )

  • stef boerrigter said:
    1. The bugfix for Q2 (i expect it then soon / e.g. before july 2018) shall it be fixed in the PVR drivers? (so an update for ti-sgx-ddk binary blobs?)

    Yes, it is in DDK UM (user mode) library libpvrDRMWSEGL.so

    stef boerrigter said:
    2. is it an option for us to switch from QPA: eglfs to eglfs_kms ?

    yes

    stef boerrigter said:
    1. What would be (possible) downsides?

    No downside. In fact you will have more flexibility to program/use the advance processing feature of DSS (Display Sub System) using eglfs_kms QPA as the DRM resource is owned by eglfs_kms QPA. We have enhanced eglfs_kms QPA that enables the user application to use the QPA for scaling, alpha blending of the user provided video planes and overlay on top of graphics plane drawn by the QT/SGX before displaying. This enhanced eglfs_kms QPA will be available in 1Q, 2018 PLSDK release.

    stef boerrigter said:
    2. before you pointed us from eglfs_kms -> eglfs (

    At that time there was known issue with eglfs_kms QPA but that's been addressed now. 

  • 1. Can you give us an (estimated) date for a fix for the eglfs User Mode library ?

    2. The eglfs_kms issue is addressed you mention. is it fixed or known?

    a. if fixed, from what version (and what components) on is it fixed? 

             b. if fixed how do we migrate from eglfs to eglfs_kms? 

  • stef boerrigter said:
    1. Can you give us an (estimated) date for a fix for the eglfs User Mode library ?

    The fix will available in 2Q, 2018 Processor SDK release schedule June end, 2018

    stef boerrigter said:

    2. The eglfs_kms issue is addressed you mention. is it fixed or known?

    a. if fixed, from what version (and what components) on is it fixed?

    The eglfs_kms QPA plugin is provided by QT. TI added some temporary code on it causing the issue and that's been rolled back, so the issue doesn't exist anymore. 

    stef boerrigter said:
       b. if fixed how do we migrate from eglfs to eglfs_kms? 

    Please wait for Processor SDK 1Q, 2018 release scheduled March end, 2018 to absorb eglfs_kms QPA. The user application shouldn't change when migrating from eglfs to eglfs_kms QPA. Please follow the qtbase Arago build recipe to build and install the eglfs_kms plugin to your  filesystem. 

  • I looked into the Q1 release (

    PROCESSOR-SDK-LINUX-AM57X  04_03_00_05

    Build date: 03272018)

    And it still includes the ti-sgx- drivers version 1.14.3699939 that we already have. 

    I thought there was an update for the eglfs_kms subsystem?

  • Update to eglfs_kms is enhancement in qtbase code related to eglfs_kms QPA. There is no changes to the ti-sgx-drivers code.
  • What branch / url can we find these enhancements?

    general QT archive or TI branch / repository?

  • Any update in where to find the fix? i tried latest QT 5.9 release in combination with ti SGX drivers but still no fix.

    What is the combination to use?

  • Hi Stef,

    Sorry for delayed response. I was out of office last week. The changes are not yet upstreamed to QT source code. They are on TI branch on QT version 5.7.

    You can find the patches to be applied on QT 5.7 source code when you clone arago project using processor-sdk-04.02.00.09-config.txt following documentation in below wiki page. Patches can be found under ../oe-layersetup/sources/meta-processor-sdk/recipes-qt/qt5/qtbase/ 0001-eglfs_kms-enhance-the-QPA-for-multiple-display-and-u.patch