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/DRA756: gbm_pvr_bo_import error when excute "gbm_bo_import()"

Part Number: DRA756

Tool/software: Linux

Hello.

I'm using latest Processor SDK(3.01) with VAYU EVM board.

I'm testing ivi-share protocol of wayland-ivi-extesion with weston/wayland.(version is 1.11.0)

In ivi-share code, gbm_bo_import(backend->gbm, GBM_BO_IMPOR....) is calling.

But below gpu related error message is shown.

-------------------------------------------------------------------

118         if (!buffer) {
(gdb) n
122         struct gbm_bo *bo = gbm_bo_import(backend->gbm, GBM_BO_IMPORT_WL_BUFFER,
(gdb) n
PVR:(Error): [ 1257-> 1257] <                  gbm_pvr_bo_import():276|ERROR> GBM import function not supported [0, ]
124         if (!bo) {

------------------------------------------------------------------

Please explain about this error. Is pvr dirver/lib still not surpporting this fucntion otherwise... Did I do the wrong test?

p.s.

Also I read some answer at here that processor SDK version 3.01 looks like not support above function of sgx.

If then, I want know release date of processor SDK 3.02

Thank you.

  • I saw some thread that related to pvr
    e2e.ti.com/.../2071363

    I tested processor sdk 3.01 with latest commit of sgx
    ti-sgx-ddk-km_1.14.3699939 --> SRCREV = "fd47e44b18944cf7ade480ac67a9c0172619ff7e"
    ti-sgx-ddk-um_1.14.3699939 --> SRCREV = "6019bf95ee30a65db6b27ea48e6ee65e8b16e0a6"

    but still above error message is printing.
  • Hi,

    I have forwarded your question to graphics expert.

    Regards,
    Yordan
  • Hi,

    GBM import of DMABUF FD will be supported as part of 3.02 release slated end-Feb.

    Regards,
    Anand
  • Is 3.02 release has rescheduled? When it will be released?

  • Hi Lee,
    PSDKLA3.02 release is rescheduled to March 2nd week.
    If you are looking for gbm_import support only, you can copy the sgx-um libraries/binaries from below commit to your rootfs.
    git.ti.com/.../1.14.3699939

    Thanks
    Ramprasad
  • Hi Lee,

    The release will happen on 10-Mar.

    I would recommend picking up the release when it's available. Taking the SGX UM binaries alone could take you on a custom configuration which may not be supported.

    Regards,
    Anand
  • Thank you for notifying of the exact schedule.
  • Hello Anand.

    I tested it psdk 3.02 today.

    But there is still a same problem.

    "

    [00:07:23.040] failed to import gbm_bo

    PVR:(Error): [ 1226-> 1226] <                  gbm_pvr_bo_import():327|ERROR> Import type <21761> not supported [0, ]

    "

    We need this solution.

    I heard from genivi wayland-ivi-extension contributor that ivi-share feature of Genivi project is worked on intel borad(intel broxton board(apolo lake))

    Please check below mail thread

    Could check this issue?

    I attached email thread , If you want get more information, please check it.

    Hello Mizuno
    
    Thank you for helping me.
    
    I saw working simple-ivi-share application in x86 with drm-backend.
    (I installed Ubuntu server newly and build wayland/Weston/wayland-ivi-extension again for this environment.)
    
    And I found the reason of TI sdk in gbm and gpu driver.
    As you said, TI gpu(sgx) does not have sufficient function for ivi-share.
    In my case, exact point was gbm_bo_import function of ivi-share-gbm.c gbm_bo_import is defined in sgx lib but looks like not implemented.
    TI will upgrade it at next sdk version.
    
    I hope that it will be work with next sgx library and driver
    
    Thank you.
    
    
    -----Original Message-----
    From: Mizuno, Wataru (ADITJ/SWG) [mailto:wmizuno@jp.adit-jv.com]
    Sent: Thursday, February 02, 2017 3:28 PM
    To: �̾��; Ucan, Emre (ADITG/SW1); genivi-ivi-layer-management@lists.genivi.org
    Cc: Ishikawa, Tetsuri (ADITJ/SWG); securitycheck@denso.co.jp
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    Hello Lee,
    
    >What do you use to develop for ivi-share feature?
    >Are you using intel based embedded borad or descktop without x11?
    I use intel based embedded board.
    I am using intel broxton board(apolo lake). And also it worked on  baytrail borad.
    
    Best regards,
    
    Wataru Mizuno
    ADITJ / SWG
    
    +81-(0)566-56-0946
    
    
    -----Original Message-----
    From: �̾�� [mailto:YangWoo.lee@hyundai-autron.com]
    Sent: Thursday, February 2, 2017 2:48 PM
    To: Mizuno, Wataru (ADITJ/SWG); Ucan, Emre (ADITG/SW1); genivi-ivi-layer-management@lists.genivi.org
    Cc: Ishikawa, Tetsuri (ADITJ/SWG); securitycheck@denso.co.jp
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    Hello Mizuno.
    
    I understand. Thank you.
    
    What do you use to develop for ivi-share feature?
    Are you using intel based embedded borad or descktop without x11?
    
    I want see working simple-ivi-share. Please share your environment.
    
    Thank you.
    
    
    -----Original Message-----
    From: Mizuno, Wataru (ADITJ/SWG) [mailto:wmizuno@jp.adit-jv.com]
    Sent: Thursday, February 02, 2017 11:20 AM
    To: �̾��; Ucan, Emre (ADITG/SW1); genivi-ivi-layer-management@lists.genivi.org
    Cc: Ishikawa, Tetsuri (ADITJ/SWG); securitycheck@denso.co.jp
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    Hello Lee,
    
    On desktop environment, simple-ivi-share does'nt work.
    Because the backend is different. The simple-ivi-share needs drm-backend but weston on desktop it uses x11-backend.
    
    In simple-ivi-share, it gets buffer from shared client app from "struct gbm_device gbm" in drm_backend but x11_backend doesn't have that structure.
    In simple-ivi-share, it is casted so it looks working but actually it doesn't get texture and no texture is shown.
    
    Best regards,
    
    Wataru Mizuno
    ADITJ / SWG
    
    +81-(0)566-56-0946
    
    
    -----Original Message-----
    From: �̾�� [mailto:YangWoo.lee@hyundai-autron.com]
    Sent: Wednesday, February 1, 2017 10:00 AM
    To: Mizuno, Wataru (ADITJ/SWG); Ucan, Emre (ADITG/SW1); genivi-ivi-layer-management@lists.genivi.org
    Cc: Ishikawa, Tetsuri (ADITJ/SWG); securitycheck@denso.co.jp
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    I checked more under x86 xwayland environment.
    My problem was IVI_SHAREBUFFER_NOT_AVAILABLE when send_to_client() in ivi-share.c
    
    Issued point is...
    weston-ivi-shell/src/ivi-share-gbm.c  -> update_buffer_nativesurface( ) -> struct weston_buffer *buffer = p_nativesurface->surface->buffer_ref.buffer;
    
    As a result,
    p_nativesurface->surface->buffer_ref.buffer looks null
    
    I will debug more. if you know the reason, please let me know.
    
    Thank you. 
    -----Original Message-----
    From: �̾�� [mailto:YangWoo.lee@hyundai-autron.com]
    Sent: Tuesday, January 31, 2017 6:36 PM
    To: 'Mizuno, Wataru (ADITJ/SWG)'; 'Ucan, Emre (ADITG/SW1)'; 'genivi-ivi-layer-management@lists.genivi.org'
    Cc: 'Ishikawa, Tetsuri (ADITJ/SWG)'; 'securitycheck@denso.co.jp'
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    Thank you for your answer.
    
    I tried it under x86 desktop Ubuntu 16.04 system using xwayland environment.
    Sadly, result was same(black surface). I'm using wayland/Weston/wayland-ivi-extension 1.11.0
    
    I could see below message but there is no contents.
    [18:26:24.480] Loading module '/usr/local/lib/weston/ivi-controller.so'
    [18:26:24.480] ivi-controller: No ivi-input-module set [18:27:03.002] Buffer Sharing Request bind: version(1)
    
    Do you have experience about running simple-ivi-share with 1.11.0?
    Or what version did you tried on intel(x86)?
    
    -----Original Message-----
    From: Mizuno, Wataru (ADITJ/SWG) [mailto:wmizuno@jp.adit-jv.com]
    Sent: Tuesday, January 31, 2017 2:47 PM
    To: �̾��; Ucan, Emre (ADITG/SW1); genivi-ivi-layer-management@lists.genivi.org
    Cc: Ishikawa, Tetsuri (ADITJ/SWG); securitycheck@denso.co.jp
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    Hello Lee,
    
    >Where can I get "EGLImageKHR eglimage;" value or who setting the value?
    The arguments of EGLCreateImageKHR are "EGL_DRM_BUFFER_MESA" and "buffer_name".
    The buffer_name is important to get image. That name set by ivi-shell. 
    
    The flow of setting buffer_name is below.
     1.Shared surface(the surface whose ID is set of simple-ivi-share argument) does eglSwapBuffers  2.The ivi-shell catchs attach event and get buffer object by using libgbm.
     3.By using libdrm, ivi-shell gets drm_gem_flink. The gem is the drm object which represent the buffer.
     4.The ivi-shell sends drm_gem_flink.name to simple-ivi-share app.
     5. The simple-ivi-share app calls eglCreateImageKHR() to get eglImage.
    
    So simple-ivi-share needs Mesagbm. And in my understanding, it is compatible intel board.
    I have tried on renesas board but I could not use it.
    
    Best regards,
    
    Wataru Mizuno
    ADITJ / SWG
    
    +81-(0)566-56-0946
    
    
    -----Original Message-----
    From: �̾�� [mailto:YangWoo.lee@hyundai-autron.com]
    Sent: Tuesday, January 31, 2017 2:22 PM
    To: Mizuno, Wataru (ADITJ/SWG); Ucan, Emre (ADITG/SW1); genivi-ivi-layer-management@lists.genivi.org
    Cc: Ishikawa, Tetsuri (ADITJ/SWG); securitycheck@denso.co.jp
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    In my case, "window->share_buffer.eglimage" was null of redraw function of simple-ivi-share application.
    
    if (window->share_buffer.eglimage != NULL) { ...
    
    Where can I get "EGLImageKHR eglimage;" value or who setting the value?
    
    I may need a basic explanation. If then sorry that my question is stupid.
    
    
    -----Original Message-----
    From: �̾�� [mailto:YangWoo.lee@hyundai-autron.com]
    Sent: Tuesday, January 31, 2017 11:24 AM
    To: 'Mizuno, Wataru (ADITJ/SWG)'; 'Ucan, Emre (ADITG/SW1)'; 'genivi-ivi-layer-management@lists.genivi.org'
    Cc: 'Ishikawa, Tetsuri (ADITJ/SWG)'; 'securitycheck@denso.co.jp'
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    Hello Mizuno.
    
    I'm working on TI J6 board.
    This TI board using SGX544 GPU, so I'm using it's libraries and driver instead mesa open source.
    
    Because this TI SDK supporting OpenGL ES 2.0 and EGL 1.4, I thought, it already supporting required API for EGLImages.
    And I confirmed required API in its  implemented header file like below.
    
    /usr/include/GLES/glext.h
    GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
    
    Do I need more libraries like mesa to run simple-ivi-share application?
    
    -----Original Message-----
    From: Mizuno, Wataru (ADITJ/SWG) [mailto:wmizuno@jp.adit-jv.com]
    Sent: Friday, January 27, 2017 9:02 PM
    To: �̾��; Ucan, Emre (ADITG/SW1); genivi-ivi-layer-management@lists.genivi.org
    Cc: Ishikawa, Tetsuri (ADITJ/SWG); securitycheck@denso.co.jp
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    Hello,
    
    Your procedure is correct.
    Please check you use the Mesa.
    
    The simple-ivi-share cannot get shared buffer without Mesa.
    
    Best regards,
    
    Wataru Mizuno
    ADITJ / SWG
    
    +81-(0)566-56-0946
    
    -----Original Message-----
    From: genivi-ivi-layer-management [mailto:genivi-ivi-layer-management-bounces@lists.genivi.org] On Behalf Of ???
    Sent: Thursday, January 26, 2017 9:14 AM
    To: Ucan, Emre (ADITG/SW1); genivi-ivi-layer-management@lists.genivi.org
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    Thank you Ucan.
    
    I could compile successfully with your patch and ran it.
    But still I don't know how to test it.
    Could explain how to test or how to proof it?
    
    I did like below.
    1. run Weston-flower sample application(let's say it's id is 10201) 2. Make screen-layer-surface hierarchy with running surface id 10201(id of weston-flower) 3. run "simple-ivi-share 10201"  and check created shared surface id 1000 from surface 10201(using LayerManagerControl surfaces)
       -- I could see two surfaces 10201 and 1000 4. Make screen-layer-surface hierarchy for surface ID 1000 ==> I could not see any image or contents from surface id 1000, It just output black screen.
    
    Also I tried weston-simple-egl application with above flow, but below error message was printed.
    Do I have a misunderstanding about simple-ivi-share application?
    
    Specified surface (ID:10229) is invalid
    Specified surface (ID:10229) is invalid
    Specified surface (ID:10229) is invalid
    .....
    
    
    -----Original Message-----
    From: Ucan, Emre (ADITG/SW1) [mailto:eucan@de.adit-jv.com]
    Sent: Wednesday, January 25, 2017 10:40 PM
    To: �̾��; genivi-ivi-layer-management@lists.genivi.org
    Subject: RE: help: Segmentation fault during simple-ivi-share testing
    
    Hi,
    
    I fixed not the compilation error and made a PR for wayland-ivi-extension: https://github.com/GENIVI/wayland-ivi-extension/pull/15
    
    You can try it out.
    
    Best regards
    
    Emre Ucan
    Software Group I (ADITG/SW1)
    
    Tel. +49 5121 49 6937
    
    > -----Original Message-----
    > From: genivi-ivi-layer-management [mailto:genivi-ivi-layer-management-
    > bounces@mailman1.genivi.org] On Behalf Of ???
    > Sent: Mittwoch, 25. Januar 2017 06:55
    > To: genivi-ivi-layer-management@lists.genivi.org
    > Subject: RE: help: Segmentation fault during simple-ivi-share testing
    > 
    > Hello.
    > 
    > 
    > 
    > I debugged it using gdb.
    > 
    > Result was
    > 
    > 
    > 
    > ----------------------------------------------------------------------
    > ------
    > ----
    > 
    > Program received signal SIGSEGV, Segmentation fault.
    > 
    > 0xb6ef2904 in wl_proxy_marshal_constructor ()
    > 
    >    from /usr/lib/libwayland-client.so.0
    > 
    > (gdb) bt
    > 
    > #0  0xb6ef2904 in wl_proxy_marshal_constructor ()
    > 
    >    from /usr/lib/libwayland-client.so.0
    > 
    > #1  0x00011adc in ivi_share_get_ivi_share_surface 
    > (surface_id=<optimized
    > out>,
    > 
    >     ivi_share=<optimized out>)
    > 
    >     at
    > /usr/src/debug/wayland-ivi-extension/1.10.90-r1/build/protocol/ivi-
    > share-client-protocol.h:123
    > 
    > #2  get_share_surface (display=0xbefff710, window=0xbefff73c)
    > 
    >     at /usr/src/debug/wayland-ivi-extension/1.10.90-r1/wayland-ivi-
    > extension-1.10.90/ivi-layermanagement-examples/simple-ivi-
    > share/src/simple-
    > ivi-share.c:273
    > 
    > #3  main (argc=<optimized out>, argv=<optimized out>)
    > 
    >     at /usr/src/debug/wayland-ivi-extension/1.10.90-r1/wayland-ivi-
    > extension-1.10.90/ivi-layermanagement-examples/simple-ivi-
    > share/src/simple-
    > ivi-share.c:693
    > 
    > ----------------------------------------------------------------------
    > ------
    > -----------------------
    > 
    > 
    > 
    > So I added missing build configuration ��option (IVI_SHARE "Enable 
    > ivi_share protocol" ON)��
    > 
    > 
    > 
    > But there is still compile problem
    > 
    > ��wayland-ivi-extension-1.10.90/weston-ivi-shell/src/ivi-share.h:25:38:
    > fatal error: ivi-controller-interface.h: No such file or directory��
    > 
    > 
    > 
    > I couldn��t find ��ivi-controller-interface.h�� anywhere both
    > wayland-ivi- extension and Weston directory.
    > 
    > 
    > 
    > 
    > 
    > From: �̾�� [mailto:YangWoo.lee@hyundai-autron.com]
    > Sent: Wednesday, January 25, 2017 1:14 PM
    > To: genivi-ivi-layer-management@lists.genivi.org
    > Subject: help: Segmentation fault during simple-ivi-share testing
    > 
    > 
    > 
    > Hello
    > 
    > 
    > 
    > I don��t know, how to test simple-ivi-share application?
    > 
    > I ran the weston-simple-egl with wayland-ivi-extesnion. and I can get 
    > surface ID ��17023�� through "LayerManagerControl" command
    > 
    > After then I ran it like "simple-ivi-shell 17023"
    > 
    > But result was "Segmentation fault"
    > 
    > Is this the right way? What can I expect after this command?
    > 
    > I don't know how to test it. Please help me.
    > 
    > 
    > 
    > Thank you
    > 
    > _______________________________________________
    > genivi-ivi-layer-management mailing list 
    > genivi-ivi-layer-management@mailman1.genivi.org
    > http://lists.genivi.org/cgi-bin/mailman/listinfo/genivi-ivi-layer-mana
    > gement
    
    _______________________________________________
    genivi-ivi-layer-management mailing list genivi-ivi-layer-management@lists.genivi.org
    http://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-management
    
    
    

  • Hello Anand

    I checked more at error log.

    before 3.02, the error message was " GBM import function not supported" from sgx-ddk-um

    But now, in 3.02, It printing "Import type <21761> not supported" (actually 21761 was 0x5501 in hex)

    I could found the type which is mentioned above at "libgbm/gbm.h"

    #define GBM_BO_IMPORT_WL_BUFFER         0x5501
    #define GBM_BO_IMPORT_EGL_IMAGE         0x5502

    I tried both GBM_BO_IMPORT_WL_BUFFER and GBM_BO_IMPORT_EGL_IMAGE.

    But "type not supported" still seen.

    When will be supported above two type in sgx-um?

    And what type can use now?

    Please answer...

  • Hi yangwoo,

    We support GBM_BO_IMPORT_FD today. Can you please try with importing a DMABUF FD as the type?

    Regards,
    Anand
  • I tried with GBM_BO_IMPORT_FD
    Below is message with GBM_BO_IMPORT_FD
    TI has schedule for below format? because we are working on the wayland
    #define GBM_BO_IMPORT_WL_BUFFER 0x5501
    #define GBM_BO_IMPORT_EGL_IMAGE 0x5502

    [08:46:24.796] failed to import gbm_bo
    PVR:(Error): [ 1199-> 1199] < gbm_pvr_bo_create_common():262|ERROR> Failed to allocate DBM buffer: Operation not permitted [0, ]
    [08:46:24.813] failed to import gbm_bo
    [08:46:24.829] failed to import gbm_bo
    PVR:(Error): [ 1199-> 1199] < gbm_pvr_bo_create_common():262|ERROR> Failed to allocate DBM buffer: Operation not permitted [0, ]

    We have many plans with Jacinto6, like 4ch display, 4ch camera input on wayland for cockpit system

    For this we need WM(wayland) and it's buffer sharing solution.

    Please help us.

  • Hi yangwoo,

    PSDKLA 3.02 release is available now:
    processors.wiki.ti.com/.../Processor_SDK_Linux_Automotive_Release_Notes

    We support Wayland 1.9 as part of PSDKLA 3.02 release. Can you please confirm if you see the problem on Wayland 1.9?

    If so, we will need a sample application and instructions to reproduce the problem for GBM_BO_IMPORT_FD on PSDKLA 3.02. We can look into the problem based on your response.

    Regards,
    Anand
  • Hi Anand

    I'm working PSDKLA 3.02 and wayland/wayland_ivi-extension(1.9) since it released

    Basically, wayland of PSDKLA 3.02 has no problem. but ivi_share feature of wayland_ivi_extension has looks problem.

    Below is my test case with wayland OOB sample application.

    1. Build again weston-ivi-extension package with below definition to enable ivi-share

    EXTRA_OECMAKE += "-DIVI_SHARE:STRING=ON"

    1. Run weston with ivi-controller.so (ivi-controller.so is from wayland-ivi-extension. please use below weston.ini instead desktop-shell config)

    [core]
    backend=drm-backend.so
    shell=ivi-shell.so

    [ivi-shell]
    ivi-module=ivi-controller.so
    ivi-input-module=ivi-input-controller.so
    ivi-shell-user-interface=/usr/lib/weston/weston-ivi-shell-user-interface

    2. Run application "weston-simple-egl"

    3. Check surface id of "weston-simple-egl" through "LayerManagerControl get surfaces" command ( Let's assume it returns 1255 as it's id)

    4. Run LayerManagerControl command to enable weston-simple-egl visibility( $1 is surface id of application)

    LayerManagerControl create layer 1000 1920 1080
    LayerManagerControl set screen 0 render order 1000
    LayerManagerControl set layer 1000 visibility 1

    LayerManagerControl set surface $1 source region 0 0 300 300
    LayerManagerControl set surface $1 destination region 0 0 300 300

    LayerManagerControl set layer 1000 render order $1

    LayerManagerControl set surface $1 visibility 1

    5. Run application "simple-ivi-share" to share surface(In my case this share application is not working with error from gbm_bo_import)

    simple-ivi-share 1255

    * Above error is generated in below code

    PATH: wayland-ivi-extension/1.9.1-r0/git/weston-ivi-shell/src/ivi-share-gbm.c
    Function: update_buffer_nativesurface() --> gbm_bo_import(backend->gbm, GBM_BO_IMPORT_WL_BUFFER,......

    When I use GBM_BO_IMPORT_WL_BUFFER as parameter of gbm_bo_import,
    It printing "Import type <21761> not supported" (actually 21761 was 0x5501 in hex)

    And when I use GBM_BO_IMPORT_FD,
    It printing [08:46:24.796] failed to import gbm_bo
    PVR:(Error): [ 1199-> 1199] < gbm_pvr_bo_create_common():262|ERROR> Failed to allocate DBM buffer: Operation not permitted [0, ]

    I assumed that we need GBM_BO_IMPORT_WL_BUFFER to use ivi-share of wayland.

    Is it possible to use GBM_BO_IMPORT_FD instead GBM_BO_IMPORT_WL_BUFFER in wayland environment?

    If it is posible, ... I don't know how to enable it with GBM_BO_IMPORT_FD.

    I tried it in intel x86, It was work fine.

    And Genivi guy tried it in intel based embedded board (broxton board apolo lake), It also work

    As you know, buffer sharing(for screen/surface mirroing) is very important in multi display system.

    I like to prove it in TI AP

    I hope that this feature will also work in TI AP

    Please support me.

    Thank you.

  • Hi Lee,
    I am trying to reproduce your issue with PSDKLA3.02.
    As you mentioned in earlier posts, "ivi-share" option with way-land-ivi-extension is disabled in the recipe.
    in that case, simple-ivi-share exits with a Segmentation fault.

    I added this patch in recipes-graphics/wayland/wayland-ivi-extension_1.9.1.bb
    -PACKAGECONFIG ??= "ilm_input"
    +PACKAGECONFIG ??= "ilm_input ivi-share"
    to enable and with this changes, new ivi-controller.so and ivi-input-controller.so are generated.

    Now I executed below commands on my DRA7x EVM.

    root@dra7xx-evm:~#layer-add-surfaces 1000 2 &
    CreateWithDimension: layer ID (1000), Width (1280), Height (800)
    SetVisibility : layer ID (1000), ILM_TRUE
    layer: 1000 created

    root@dra7xx-evm:~#weston-simple-shm &
    surface : 10158 created
    SetDestinationRectangle: surface ID (10158), Width (250), Height (250)
    SetSourceRectangle : surface ID (10158), Width (250), Height (250)
    SetVisibility : surface ID (10158), ILM_TRUE
    layerAddSurface : surface ID (10158) is added to layer ID (1000)

    root@dra7xx-evm:~# LayerManagerControl set surface 10158 position 400 400
    This is to move the postion of the surface. As expected, I am observing a previous displayed weston-simple-shm at 0,0 even after moving.

    root@dra7xx-evm:~# simple-ivi-share 10158 &
    wlpvr: PVR Services Initialised
    surface : 1000 created
    SetDestinationRectangle: surface ID (1000), Width (250), Height (250)
    SetSourceRectangle : surface ID (1000), Width (250), Height (250)
    SetVisibility : surface ID (1000), ILM_TRUE
    layerAddSurface : surface ID (1000) is added to layer ID (1000)

    root@dra7xx-evm:~#
    root@dra7xx-evm:~#

    I started seeing a black screen now at 0,0(overwriting weston-simple-shm at 0, 0) but did not see any error.
    From your mail email.log , I guess you also observed the same issue right?
    Did you have to modify anyhting else to print the error?

    Thanks
    Ramprasad
  • Hi Ramprasad.


    Thank you for your support.

    Although, your test case is not same with my case, I tried it and get same result.

    I could not see cloned surface, but I can confirm it through "LayerManagerControl get scene"

    I don't know why it also not work.

    In other sories, my test case was used application that weston-simple-egl.

    This application sharing was tested in x86 weston, it was success, I could see cloned weston-simple-egl surface in the monitor.

    But when I tried it in TI board, I got error as mentioned above


    Could you do that using weston-simple-egl?

    Below is my test case with wayland OOB sample application.
    1. Build again weston-ivi-extension package with below definition to enable ivi-share
    EXTRA_OECMAKE += "-DIVI_SHARE:STRING=ON"
    1. Run weston with ivi-controller.so (ivi-controller.so is from wayland-ivi-extension. please use below weston.ini instead desktop-shell config)
    [core]
    backend=drm-backend.so
    shell=ivi-shell.so
    [ivi-shell]
    ivi-module=ivi-controller.so
    ivi-input-module=ivi-input-controller.so
    ivi-shell-user-interface=/usr/lib/weston/weston-ivi-shell-user-interface
    2. Run application "weston-simple-egl"
    3. Check surface id of "weston-simple-egl" through "LayerManagerControl get surfaces" command ( Let's assume it returns 1255 as it's id)
    4. Run LayerManagerControl command to enable weston-simple-egl visibility( $1 is surface id of application)
    LayerManagerControl create layer 1000 1920 1080
    LayerManagerControl set screen 0 render order 1000
    LayerManagerControl set layer 1000 visibility 1
    LayerManagerControl set surface $1 source region 0 0 300 300
    LayerManagerControl set surface $1 destination region 0 0 300 300
    LayerManagerControl set layer 1000 render order $1
    LayerManagerControl set surface $1 visibility 1
    5. Run application "simple-ivi-share" to share surface(In my case this share application is not working with error from gbm_bo_import)
    simple-ivi-share 1255
    * Above error is generated in below code
    PATH: wayland-ivi-extension/1.9.1-r0/git/weston-ivi-shell/src/ivi-share-gbm.c
    Function: update_buffer_nativesurface() --> gbm_bo_import(backend->gbm, GBM_BO_IMPORT_WL_BUFFER,......
    When I use GBM_BO_IMPORT_WL_BUFFER as parameter of gbm_bo_import,
    It printing "Import type <21761> not supported" (actually 21761 was 0x5501 in hex)
    And when I use GBM_BO_IMPORT_FD,
    It printing [08:46:24.796] failed to import gbm_bo
    PVR:(Error): [ 1199-> 1199] < gbm_pvr_bo_create_common():262|ERROR> Failed to allocate DBM buffer: Operation not permitted [0, ]

    I assumed that we need GBM_BO_IMPORT_WL_BUFFER to use ivi-share of wayland.
    Is it possible to use GBM_BO_IMPORT_FD instead GBM_BO_IMPORT_WL_BUFFER in wayland environment?
    If it is posible, ... I don't know how to enable it with GBM_BO_IMPORT_FD

  • Hi Lee,
    I have tested gbm_bo_import with GBM_BO_IMPORT_FD for an ARGB32 buffer with PSDKLA3.02 and it is working fine.
    Below is the code.

    int dfd = omap_bo_dmabuf(buf->bo[0]); // fd of a RGB32 buffer.
    EGLint attrib_list = EGL_NONE;
    struct gbm_import_fd_data gbm_dmabuf = {
    .fd = dfd,
    .width = buf->width,
    .height = buf->height,
    .stride = buf->pitches[0],
    .format = GBM_FORMAT_ARGB8888
    };
    gbm.bo = gbm_bo_import(gbm.dev, GBM_BO_IMPORT_FD, &gbm_dmabuf,
    GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING );
    if(!gbm.bo){
    ERROR("gbm_bo_import failed\n");
    return -1;
    }

    egl_img =
    eglCreateImageKHR(display, EGL_NO_CONTEXT,
    EGL_NATIVE_PIXMAP_KHR, gbm.bo, &attrib_list);

    This is how we can use RGB buffer as texture using gbm_bo_import.
    I will try to use GBM_BO_IMPORT_EGL_IMAGE and GBM_BO_IMPORT_WL_BUFFER in my application and let you know the observation.


    Ramprasad
  • Thank you Ramprasad.
    Because I'm not a expert at graphic area, I thought that GBM_BO_IMPORT_WL_BUFFER is only the solution in wayland.
    Is it possible or is there a way to use GBM_BO_IMPORT_FD instead GBM_BO_IMPORT_WL_BUFFER in ivi-share of wayland-ivi-extension?
    Anyway I will wait your observation about GBM_BO_IMPORT_EGL_IMAGE and GBM_BO_IMPORT_WL_BUFFER.
  • Hi Lee,
    Both GBM_BO_IMPORT_WL_BUFFER and GBM_BO_IMPORT_EGL_IMAGE are not supported.
    GBM_BO_IMPORT_FD is the one import type supported now.
    I will get back to you on if we can use GBM_BO_IMPORT_FD in ivi-share example.

    Ramprasad
  • Hi Ramprasad,

    Is there no schudule for GBM_BO_IMPORT_WL_BUFFER and GBM_BO_IMPORT_EGL_IMAGE on TI SDK?

    If then, at least, I really hope that can use GBM_BO_IMPORT_FD in ivi-share example now in wayland if it is possible.

    Thank you for helping me.

  • Hi yangwoo,

    The GBM_BO_IMPORT_WL_BUFFER and GBM_BO_IMPORT_EGL_IMAGE will be supported in our Oct release.

    In the meanwhile, support for GBM_BO_IMPORT_FD is available.

    Regards,
    Anand
  • Hi yangwoo,

    As discussed in earlier posts, this feature is not supported in current releases. Since it is a feature request, it gets scheduled based on current backlog.

    Can you directly reach out to your TI FAE? We would like to understand your use case better so that TI can provide relevant support.

    Regards,
    Anand
  • Hi Anand.

    Ok. I will tell to our TI FAE aout this situation and request it again.

    In parallel, Can I wait your result of GBM_BO_IMPORT_FD on wayland ivi-share?

    Because we need proof ivi-share feature on TI board ASAP.

    Regards,

    Yangwoo

  • Hi Yangwoo,

    We will share the example application for GBM_BO_IMPORT_FD by Monday, 4/17. This is a standalone application using GBM. You can try this and let us know.

    Can you share instructions on how to check this on wayland-ivi-share?

    Regards,
    Anand
  • Hello Anand

    I had discussed this with other TI guy(Ramprasad).

    Please check below link that is described how to run simple-ivi-share application.

    e2e.ti.com/.../2142175

    Regards,

    Yangwoo

  • Hello Anand.

    I there any update or news for simple-ivi-share with GBM_BO_IMPORT_FD?

    I'm still waiting it.

    Regards,

    Yangwoo

  • Hi Lee,
    As you are aware TI SDK's gbm backend supports only GBM_BO_IMPORT_FD.
    I am trying to use GBM_BO_IMPORT_FD in simple-ivi-share by using the simple-dmabuf as surface sharing application. This worked and got a gbm_bo with GBM_BO_IMPORT_FD .

    But after we get gbm_bo
    simple-ivi-share application is expecting Mesa GBM backend and uses some terms EGL_DRM_BUFFER_MESA , EGL_DRM_BUFFER_FORMAT_MESA etc and these are not supported by our gbm backend.
    From the email.log you have shared also it is clear simple-ivi-share is expecting Mesa GBM backend.

    We will share the application to use GBM_BO_IMPORT_FD to get the gbm_bo soon.

    Thanks
    Ramprasad
  • Thank you Ramprasad.

    So, that means, the result was simple_ivi_share application is not working with GBM_BO_IMPORT_FD?

    I was hope that simple_ivi_share is working with GBM_BO_IMPORT_FD temporary of GBM_BO_IMPORT_WL_BUFFER.

    Can I expect supporting/working simple-ivi-share application by TI side at least later?

    (This could mean Mesa GBM support by TI)

    I like to know if this application will work in Jancinto6 board or not. because ,If not, I need to find other plan.

    Thank you

    Ramprasad

  • Hi Lee,
    TI’s gbm_pvr backend supports GBM_BO_IMPORT_FD attribute only , GBM_BO_IMPORT_WL_BUFFER and GBM_BO_IMPORT_EGL_IMAGE are not supported.
    gbm_bo_import with GBM_BO_IMPORT_FD is validated to add RGB images as textures.

    Please refer the commit-id git.ti.com/.../f221e462afd8461517b1dd9d8ef04b67a07275fa

    The commit message also gives details of which application can be used for this.
    Thanks
    Ramprasad