<div dir="ltr">Sorry if this was discussed before, but any reason this is being put in Wayland, and in the "wl_" namespace? DMA-BUF is a private Linux kernel feature that's really semi-stable, not used by all drivers, and I'd hate for it to bit-rot and tell people not to use it, the same way wl_shell went. Having it only in the weston source tree, and in a private "dmabuf" namespace seems like it should be enough for now.<br>
<div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 7, 2014 at 12:41 PM, <span dir="ltr"><<a href="mailto:benjamin.gaignard@linaro.org" target="_blank">benjamin.gaignard@linaro.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Benjamin Gaignard <<a href="mailto:benjamin.gaignard@linaro.org" target="_blank">benjamin.gaignard@linaro.org</a>><br>
<br>
The goal of this serie of patches is to add a way to use<br>
dmabuf file descriptor inside wayland and weston.<br>
<br>
In a context where there is no Mesa EGL (and so no wl_drm protocol) wl_dmabuf<br>
could be used as an alternative to shm to share buffers between hardware<br>
devices. If your hardware device (video decoder, renderer, etc...) need<br>
physical contiguous memory (obviously don't have MMU) wl_dmabuf may save<br>
the cost of one copy compare to shm.<br>
<br>
shm case:<br>
videodecoder --(copy into shm_buffer)--> weston(+pixman) --> HW renderer<br>
<br>
dmabuf case:<br>
videodecoder --(directly write in dmabuf buffer)--> weston(+pixman) --> HW renderer<br>
<br>
The server is responsible to send its supported pixel formats and the device<br>
name to be used by the client to allocate buffers.<br>
<br>
While mmap() call on dmabuf file descriptor result isn't guaranty on all<br>
architectures both server and client should take care of it before accessing<br>
to buffer data to avoid segfault.<br>
<br>
This series of patches include wayland and weston modifications.<br>
An example of how use wl_dmabuf is provided in weston/clients/simple-dmabuf.c<br>
<br>
=== Wayland ===<br>
Benjamin Gaignard (1):<br>
Add wl_dmabuf protocol<br>
<br>
protocol/Makefile.am | 6 +-<br>
protocol/wayland-dmabuf.xml | 128 ++++++++++++++++++++++++<br>
src/Makefile.am | 12 ++-<br>
src/wayland-dmabuf.c | 231 +++++++++++++++++++++++++++++++++++++++++++<br>
src/wayland-dmabuf.h | 123 +++++++++++++++++++++++<br>
5 files changed, 496 insertions(+), 4 deletions(-)<br>
create mode 100644 protocol/wayland-dmabuf.xml<br>
create mode 100644 src/wayland-dmabuf.c<br>
create mode 100644 src/wayland-dmabuf.h<br>
<br>
=== Weston ===<br>
Benjamin Gaignard (2):<br>
compositor-drm: allow to be a wl_dmabuf server<br>
add simple-dmabuf client<br>
<br>
clients/Makefile.am | 11 ++<br>
clients/simple-dmabuf.c | 469 +++++++++++++++++++++++++++++++++++++++++++++++<br>
<a href="http://configure.ac" target="_blank">configure.ac</a> | 5 +<br>
src/compositor-drm.c | 83 ++++++++-<br>
src/compositor.c | 4 +-<br>
src/compositor.h | 2 +<br>
src/pixman-renderer.c | 93 +++++++---<br>
7 files changed, 637 insertions(+), 30 deletions(-)<br>
create mode 100644 clients/simple-dmabuf.c<br>
<span><font color="#888888"><br>
--<br>
1.7.9.5<br>
<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br> Jasper<br>
</div></div>