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/DRA746: eglSwapBuffer blocks when ilm surface is invisible issue.

Part Number: DRA746


Tool/software: Linux

Hi Team,

We use custom h/w and software based on DRA746 and SDK 3.03 .

We are using wayland/weston 1.11.0 and wayland-ivi-extesnion 1.11.0 and with this we are observing “eglSwapBuffer” blocks and do not return if the ilm surface is invisible. This issue also exits in other platform (i.MX6), however solution was to use “eglSwapInterval” with 0 value or setup the frame call back , callback listener and call eglSwapBuffers as a response to receiving your own copy of the frame callback.

 We have found solution to use “eglSwapInterval” with 0 value do work while other solution is working. Could you please check this issue and suggest or provide the fix?

 Attached here the sample applications binary and source to reproduce the issue.

 To reproduce the issue, you could use below commands and see in console log that “eglSwapBuffers” do not return. If you run with other attached application (IVIWLSimpleEgl_framecb), then it works.

 

export XDG_RUNTIME_DIR=/var/run/root/100

IVIWLSimpleEgl -b

LayerManagerControl set surface 55 visibility 0

LayerManagerControl set surface 55 visibility 1

 https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/26_5F00_eglSwapbuffer_5F00_hang.7z

Best Regards,

Vikash

  • Hi Vikash,
    PSDKLA3.x is integrated and tested with weston 1.9 and wayland-ivi-extesnion1.9. But issue may be reproduced here also.
    I will give a try with your application and update.

    Ram
  • Hi Ram,

    Any inputs on this issue?

    Regards,

    Vikash

  • Hi Vikash,
    I have not been able to test this yet. Will try this next week

    Ram
  • Hi Vikash,
    I could not use binaries since they are linked with 1.11.0 ilm. I built simple-egl-test.c with wayland-ivi-extension's examples
    and trying to reproduce the issue.
    I am not clear how IVIWLSimpleEgl_framecb is generated. Is it by defining FRAME_CALLBACK_SUPPROT in the simple-egl-test.c?
    and how is IVIWLSimpleEgl generated?

    Thanks
    Ramprasad
  • Hi Ram,

    Yes, you need to un-comment following line to enable FRAME_CALLBACK.

    //#define  FRAME_CALLBACK_SUPPROT 1

    Regards,

    Vikash

    Linux/DRA746: eglSwapBuffer blocks when ilm surface is invisible issue.

  • Hi Vikash,
    I uncommented #define FRAME_CALLBACK_SUPPROT and generated a binary.
    When I launch this on target, I see these prints.

    ------> eglSwapBuffers Start
    ------> eglSwapBuffers Finish
    ------> frame_callback Finish
    ------> frame_callback start
    ------> eglSwapBuffers Start

    then I set the visibility of surface 55 to 0 followed by 1. It continues to show egl on display.

    when I comment #define FRAME_CALLBACK_SUPPROT and generate a binary and execute with -b option,
    I see
    ------> eglSwapBuffers Start
    ------> eglSwapBuffers Finish
    ------> eglSwapBuffers Start
    ------> eglSwapBuffers Finish
    ------> eglSwapBuffers Start

    then I set the visibility of surface 55 to 0 followed by 1. It continues to show egl on display.
  • Hi Ram,

    Do you mean when you do not use "FRAME_CALLBACK_SUPPROT" (i.e. line is commented) and use "-b" option (i.e. 0 passed to eglSwapInterval) , you see start and finish log continuously on console in any case (either surface 55 is visible or not visible).

    If you see start and finish log of eglSwapBuffers continuously on console when surface is invisible (LayerManagerControl set surface 55 visibility 0) that means it is working and there is no issue.

    Which version of SGX drivers are you using? Is it possible you might be using some updated SGX drivers.


    Regards,
    Vikash
  • >>Do you mean when you do not use "FRAME_CALLBACK_SUPPROT" (i.e. line is commented) and use "-b" option (i.e. 0 passed to >>eglSwapInterval) , you see start and finish log continuously on console in any case (either surface 55 is visible or not visible).
    When I set the visibility to 0, I don't see console messages,
    " surfaceCallbackFunction Done" will be the last message.

    When I set the visibility to 1 back, I see start and Stop continueing.

    This is the behaviour with the other application where FRAME_CALLBACK_SUPPROT is defined.
  • Hi Ram,

    There is no issue when FRAME_CALLBACK_SUPPROT is enabled. When surface is invisible, eglSwapBuffer is not blocking (means you should see the "eglSwapBuffers Finish" at last) while it is not the case when FRAME_CALLBACK_SUPPROT is disabled and 0 is passed to eglswapinterval. Here eglSwapBuffers blocks and you only see "eglSwapBuffers start" when surface is invisible. this is an issue.

    Regards,
    Vikash
  • Hi Vikash,
    With FRAME_CALLBACK_SUPPROT is disabled, I see "eglSwapBuffers start" as last statement on console.
    But this is with or without -b option. From your description of the issue , -b is supposed to set the swapEinterval to 0 and this should resolve the issue.
  • Hi Ram,

    This is an issue. " I see "eglSwapBuffers start" as last statement on console."

    When you use -b (i.e. swapEinterval to 0) unblocks the eglswapbuffer on other platforms (e.g. i.mx6) when surface is invisible. While this is not eh case here.

    Regards,
    Vikash
  • Ok , Now I realized that -b option works on imx but not on DRA7xx.

    I checked the source code of SGX-UM. For wayland display , eglSwapInterval is a dummy function which returns success always, it is not interpreting the interval set from wayland-client application.
    Hence there is no effect of "-b" option here.

    Ram
  • Hi Ram,

    I think eglSwapInternal should be supported to accept any value. Can this be fixed?

    Regards,
    Vikash
  • Hi Vikash,

    PVR drivers don't support this currently. I will get back to you on this.

    Ram