GNOME Bugzilla – Bug 796493
kmssink: add support for GBM allocator
Last modified: 2018-11-03 14:25:02 UTC
Created attachment 372542 [details] [review] allocator In the Android, there is a similiar usuage with GPU memory, it use galloc() to allocate and access a memory from GPU. There is a GBM support in -base, it doesn't include any memory operation. This patch is verified with ARM MALI GPU library.
Review of attachment 372542 [details] [review]: Shouldn't that go into libgstgl ? And then support can be added in kmssink ? ::: sys/kms/gstgbmallocator.c @@ +1,2 @@ +/* GStreamer + * Missing copyright ? ::: sys/kms/gstgbmallocator.h @@ +5,3 @@ + * Authors: + * Víctor Manuel Jáquez Leal <vjaquez@igalia.com> + * Javier Martin <javiermartin@by.com.es> Aren't you the author ?
The GBM is not the GL/EGL texture, I think an additional upload path is still necessary. Another reason is that I am confused with the allocator in libgstgl. I have not update the author information yet, you would found this allocator is just modified from kms allocator :P
Created attachment 372557 [details] [review] following the mesa not ARM Mali ddk Both kms and wayland can use the gbm, I am planning to move the gbm allocator to a more common place. But the first thing I should do is fixing the Mali library to make it work as much as mesa.
Created attachment 372643 [details] [review] Add import interface for wayland and EGL
Review of attachment 372643 [details] [review]: Thx for your contribution. I think this should go in the "existing" directory gst-plugins-base/tree/gst-libs/gst/gl/gbm It already contains gbm bits and I am sure your patch have some duplications with this directory. Please check and let us know if there is anything in your patch that is not in this directory above. Thx! ::: sys/kms/gstgbmallocator.c @@ +268,3 @@ + h = GST_VIDEO_INFO_HEIGHT (vinfo); + + /* TODO: add C8 fackback allocation */ s/fackback/fallback/g @@ +301,3 @@ + mem = GST_MEMORY_CAST (gbmmem); + + /* TODO: add C8 fackback allocation */ Same @@ +406,3 @@ + gobject_class->finalize = gst_gbm_allocator_finalize; + + g_props[PROP_DRM_FD] = g_param_spec_int ("drm-fd", "DRM fd", Make it more clear this is a fd for the drm 'device'. Ideally you also add a drm-device-path property.
Created attachment 372662 [details] [review] Add fallback method Thank for you reviewing. The main reason I don't move it to -base is that I am not familiar with EGL and confusing with the gl allocator. Another is that I want to verify this modification as quickly as possible, the GPU work more slowly than kms. Also it should be fixed for waylandsink. Can you give me some guide on the libgstgl? About this commit, it works well on the allocation and import part with those pixel format that gbm driver doesn't support. But I failed in export dmabuf part(with those pixel format is not supported) when I use the buffer in the other device beyond the GPU.
Created attachment 372665 [details] [review] The correct fallback I uploaded a wrong version yesterday, but I found the DMAbuf won't work with those supported pixel format. And import (fd buffer) have some problem with when it use the fallback mode.
Created attachment 372678 [details] [review] fix allocator problem
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/725.