Which boards does ivi-share support?

이양우 YangWoo.lee at hyundai-autron.com
Mon Aug 28 03:36:08 EDT 2017


Hello Friedrich, Eugen

My GPU is not supporting only GBM_BO_IMPORT_FD now, so when I call gbm_bo_import with GBM_BO_IMPORT_WL_BUFFER, error has been printed like below.
"gbm_pvr_bo_import():276|ERROR> GBM import function not supported [0, ]"

At first, I used to use gbm_bo backend, but after reading your advice, I am thinking of dmabuf like "compositor-drm.c#n1178"
Do I just change like below?
(I added more code to support linux_dmabuf_buffer_get() but still not working.)

----------------------------------------------------------------------------------------------------
update_buffer_nativesurface(struct ivi_share_nativesurface *p_nativesurface,
                             struct ivi_shell_share_ext *shell_ext)
 {
+       struct wl_resource *buffer_resource;
+       struct linux_dmabuf_buffer *dmabuf;
+       struct gbm_bo *bo;
+
     if (NULL == p_nativesurface || NULL == p_nativesurface->surface) {
         return IVI_SHAREBUFFER_NOT_AVAILABLE;
     }
@@ -119,8 +123,34 @@ update_buffer_nativesurface(struct ivi_share_nativesurface *p_nativesurface,
         return IVI_SHAREBUFFER_NOT_AVAILABLE;
     }

-    struct gbm_bo *bo = gbm_bo_import(backend->gbm, GBM_BO_IMPORT_WL_BUFFER,
-                                      buffer->legacy_buffer, GBM_BO_USE_SCANOUT);
+       buffer_resource = ev->surface->buffer_ref.buffer->resource;
+       if ((dmabuf = linux_dmabuf_buffer_get(buffer_resource))) {
+               /* XXX: TODO:
+                *
+                * Use AddFB2 directly, do not go via GBM.
+                * Add support for multiplanar formats.
+                * Both require refactoring in the DRM-backend to
+                * support a mix of gbm_bos and drmfbs.
+                */
+               struct gbm_import_fd_data gbm_dmabuf = {
+                       .fd     = dmabuf->attributes.fd[0],
+                       .width  = dmabuf->attributes.width,
+                       .height = dmabuf->attributes.height,
+                       .stride = dmabuf->attributes.stride[0],
+                       .format = dmabuf->attributes.format
+               };
+
+               if (dmabuf->attributes.n_planes != 1 || dmabuf->attributes.offset[0] != 0)
+                       return NULL;
+
+               bo = gbm_bo_import(backend->gbm, GBM_BO_IMPORT_FD, &gbm_dmabuf,
+                               GBM_BO_USE_SCANOUT);
+       } else {
+
+               bo = gbm_bo_import(backend->gbm, GBM_BO_IMPORT_WL_BUFFER,
+                               buffer->legacy_buffer, GBM_BO_USE_SCANOUT);
+       }
+




-----Original Message-----
From: Friedrich, Eugen (ADITG/ESB) [mailto:efriedrich at de.adit-jv.com] 
Sent: Friday, August 25, 2017 12:03 AM
To: 이양우; Ucan, Emre (ADITG/ESB); genivi-ivi-layer-management at lists.genivi.org
Subject: RE: Which boards does ivi-share support?

Hello Yang-woo,

Please find some comment below

Best regards

Eugen Friedrich
Software Group I (ADITG/SW1)

Tel. +49 5121 49 6921

> -----Original Message-----
> From: genivi-ivi-layer-management [mailto:genivi-ivi-layer-management-
> bounces at lists.genivi.org] On Behalf Of ???
> Sent: Donnerstag, 24. August 2017 01:48
> To: Ucan, Emre (ADITG/ESB); 
> genivi-ivi-layer-management at lists.genivi.org
> Subject: RE: Which boards does ivi-share support?
> 
> Hello
> 
> I don't know about graphics like opengl.
> I hope this patch is made by an expert.
> If your situation is not good, can you give me detailed guide to make 
> and test it?
> I need a way to change GBM_BO_IMPORT_WL_BUFFER to GBM_BO_IMPORT_FD.
[EF] No you don't need to do this. For the  ivi-share protocol you need a flink name and you can get this from you will get always a wayland buffer from a client And you need to create a  gbm_bo object out of it.
So now it is a details of the implementation of the currently used EGL implementation, What kind of backend storage is actually used: it could be shm, dmabuf, gbm_bo or something else) Some example is available here: https://cgit.freedesktop.org/wayland/weston/tree/libweston/compositor-drm.c#n1178

So strictly speaking  we don't need to change from GBM_BO_IMPORT_WL_BUFFER to GBM_BO_IMPORT_FD We need to add support for dmabuf so you could use GBM_BO_IMPORT_FD.

> 
> 
> -----Original Message-----
> From: Ucan, Emre (ADITG/ESB) [mailto:eucan at de.adit-jv.com]
> Sent: Thursday, August 24, 2017 12:04 AM
> To: 이양우; genivi-ivi-layer-management at lists.genivi.org
> Subject: RE: Which boards does ivi-share support?
> 
> Hi,
> 
> I do not know. You are free to send such a patch.
> 
> Best regards
> 
> Emre Ucan
> Engineering Software Base (ADITG/ESB)
> 
> Tel. +49 5121 49 6937
> 
> > -----Original Message-----
> > From: 이양우 [mailto:YangWoo.lee at hyundai-autron.com]
> > Sent: Mittwoch, 23. August 2017 09:03
> > To: Ucan, Emre (ADITG/ESB);
> > genivi-ivi-layer-management at lists.genivi.org
> > Subject: Which boards does ivi-share support?
> >
> > Hello
> >
> > I like to know how many embedded boards ivi-share is running on.
> > Is there a verified AP other than intel? Does Raspberry Pie support 
> > this feature?
> > How about make a patch for GBM_BO_IMPORT_FD to support more
> boards?
> >
> > Thank you.
> >
> >
> > -----Original Message-----
> > From: Ucan, Emre (ADITG/ESB) [mailto:eucan at de.adit-jv.com]
> > Sent: Tuesday, August 22, 2017 2:54 PM
> > To: 이양우; genivi-ivi-layer-management at lists.genivi.org
> > Subject: RE: help: Can't get touch capabilities with 
> > "LayerManagerControl get input device default capabilities"
> >
> > Hi,
> >
> > It is possible if you modify the source code and ivi-share protocol.
> >
> > Best regards
> >
> > Emre Ucan
> > Engineering Software Base (ADITG/ESB)
> >
> > Tel. +49 5121 49 6937
> > > -----Original Message-----
> > > From: genivi-ivi-layer-management
> > > [mailto:genivi-ivi-layer-management-
> > > bounces at lists.genivi.org] On Behalf Of ???
> > > Sent: Dienstag, 22. August 2017 06:06
> > > To: genivi-ivi-layer-management at lists.genivi.org
> > > Subject: RE: help: Can't get touch capabilities with 
> > > "LayerManagerControl get input device default capabilities"
> > >
> > > Hello
> > >
> > > Is ivi-share possible to use GBM_BO_IMPORT_FD instead 
> > > GBM_BO_IMPORT_WL_BUFFER?
> > > My GPU(PVR) does not support GBM_BO_IMPORT_WL_BUFFER now. So
> > I'm
> > > trying to use GBM_BO_IMPORT_FD.
> > >
> > > Thank you.
> > >
> > > _______________________________________________
> > > genivi-ivi-layer-management mailing list 
> > > genivi-ivi-layer-management at lists.genivi.org
> > > https://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-managem
> > > en
> > > t
> 
> 
> _______________________________________________
> genivi-ivi-layer-management mailing list 
> genivi-ivi-layer-management at lists.genivi.org
> https://lists.genivi.org/mailman/listinfo/genivi-ivi-layer-management




More information about the genivi-ivi-layer-management mailing list