Common DMA GStreamr allocator

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Common DMA GStreamr allocator

Bing Song-2

Hi,

 

Currently V4L2 element can import and export DMA FD memory. glimagesink/kmssink can import DMA memory. Is there common DMA GStreamer allocator? So we can use the common DMA allocator if driver can't export DMA FD. As I know, ion driver (Android develop it) which in Linux Kernel stage fold can allocate DMA memory. Do GStreamer can accept common DMA GStreamer allocator based on ion driver?

 

Regards,

Song Bing.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Common DMA GStreamr allocator

Sebastian Dröge-3
On Mo, 2016-05-23 at 01:44 +0000, Bing Song wrote:
> Hi,
>  
> Currently V4L2 element can import and export DMA FD memory.
> glimagesink/kmssink can import DMA memory. Is there common DMA
> GStreamer allocator? So we can use the common DMA allocator if driver
> can't export DMA FD. As I know, ion driver (Android develop it) which
> in Linux Kernel stage fold can allocate DMA memory. Do GStreamer can
> accept common DMA GStreamer allocator based on ion driver?

You can find it in gst-plugins-base/gst-libs/gst/allocators/gstdmabuf.c

It can however not allocate dmabufs on its own as there is no generic
dmabuf allocation mechanism available. It can only wrap GstMemory
around existing dmabuf file descriptors.


If you have an API available that can allocate dmabufs, you could
provide an allocator around that that reuses the code mentioned above
and only extends it by the actual allocation.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Common DMA GStreamr allocator

Carlos Rafael Giani
In reply to this post by Bing Song-2
Are you talking about a DMA allocator that exports physical addresses to userspace?

On 2016-05-23 03:44, Bing Song wrote:

Hi,

 

Currently V4L2 element can import and export DMA FD memory. glimagesink/kmssink can import DMA memory. Is there common DMA GStreamer allocator? So we can use the common DMA allocator if driver can't export DMA FD. As I know, ion driver (Android develop it) which in Linux Kernel stage fold can allocate DMA memory. Do GStreamer can accept common DMA GStreamer allocator based on ion driver?

 

Regards,

Song Bing.



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Common DMA GStreamr allocator

Nicolas Dufresne-4
In reply to this post by Bing Song-2
Le lundi 23 mai 2016 à 01:44 +0000, Bing Song a écrit :

Hi,

 

Currently V4L2 element can import and export DMA FD memory. glimagesink/kmssink can import DMA memory. Is there common DMA GStreamer allocator? So we can use the common DMA allocator if driver can't export DMA FD. As I know, ion driver (Android develop it) which in Linux Kernel stage fold can allocate DMA memory. Do GStreamer can accept common DMA GStreamer allocator based on ion driver?


A common DMA allocator is somehow an eutopia. It exist on Android since you generally can't dynamically connect other video devices, hence you can intersect the alignment requirement of all drivers  and hardware on the platform. That being said, an GST ion based DMABuf allocator for Android would definatly be acceptable. A fair use will be for vendor using the same kernel/userspace for both Android and generic Linux. For DMABuf FD wrapping, there is the GstDmabufAllocator object. It's not really an allocator, because it does not allocate, but it wraps the FD into GstMemory objects for you. Normally, we tend to put the exportation of DMABuf FD near the producer of large frames (like decoders). There even exist non-standard OMX hack to make the stack export DMABuf.

Nicolas

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Common DMA GStreamr allocator

Bing Song-2
In reply to this post by Carlos Rafael Giani

No, i.MX8 will use DMA FD to share video frame buffer. No physical address any more.

 

Regards,

Song Bing.

 

From: gstreamer-devel [mailto:[hidden email]] On Behalf Of Carlos Rafael Giani
Sent: Monday, May 23, 2016 4:24 PM
To: [hidden email]
Subject: Re: Common DMA GStreamr allocator

 

Are you talking about a DMA allocator that exports physical addresses to userspace?

On 2016-05-23 03:44, Bing Song wrote:

Hi,

 

Currently V4L2 element can import and export DMA FD memory. glimagesink/kmssink can import DMA memory. Is there common DMA GStreamer allocator? So we can use the common DMA allocator if driver can't export DMA FD. As I know, ion driver (Android develop it) which in Linux Kernel stage fold can allocate DMA memory. Do GStreamer can accept common DMA GStreamer allocator based on ion driver?

 

Regards,

Song Bing.




_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel