From: Sumit Semwal <sumit.semwal@ti.com>
To: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org,
linux-media@vger.kernel.org
Cc: linux@arm.linux.org.uk, arnd@arndb.de, jesse.barker@linaro.org,
m.szyprowski@samsung.com, rob@ti.com, daniel@ffwll.ch,
t.stanislaws@samsung.com, Sumit Semwal <sumit.semwal@ti.com>
Subject: [RFC 0/2] Introduce dma buffer sharing mechanism
Date: Tue, 11 Oct 2011 14:53:51 +0530 [thread overview]
Message-ID: <1318325033-32688-1-git-send-email-sumit.semwal@ti.com> (raw)
Hello Everyone,
Various subsystems - V4L2, GPU-accessors, DRI to name a few - have felt the
need to have a common mechanism to share memory buffers across different
devices - ARM, video hardware, GPU.
This need comes forth from a variety of use cases including cameras, image
processing, video recorders, sound processing, DMA engines, GPU and display
buffers, and others.
This RFC is the first attempt in defining such a buffer sharing mechanism- it is
the result of discussions from a couple of memory-management mini-summits held
by Linaro to understand and address common needs around memory management. [1]
A new dma_buf buffer object is added, with operations and API to allow easy
sharing of this buffer object across devices.
The framework allows:
- a new buffer-object to be created with fixed size.
- different devices to 'attach' themselves to this buffer, to facilitate
backing storage negotiation, using dma_buf_attach() API.
- association of a file pointer with each user-buffer and associated
allocator-defined operations on that buffer. This operation is called the
'export' operation.
- this exported buffer-object to be shared with the other entity by asking for
its 'file-descriptor (fd)', and sharing the fd across.
- a received fd to get the buffer object back, where it can be accessed using
the associated exporter-defined operations.
- the exporter and user to share the scatterlist using get_scatterlist and
put_scatterlist operations.
Documentation present in the patch-set gives more details.
This is based on design suggestions from many people at the mini-summits,
most notably from Arnd Bergmann <arnd@arndb.de>, Rob Clark <rob@ti.com> and
Daniel Vetter <daniel@ffwll.ch>.
The implementation is inspired from proof-of-concept patch-set from
Tomasz Stanislawski <t.stanislaws@samsung.com>, who demonstrated buffer sharing
between two v4l2 devices. [2]
References:
[1]: https://wiki.linaro.org/OfficeofCTO/MemoryManagement
[2]: http://lwn.net/Articles/454389
Sumit Semwal (2):
dma-buf: Introduce dma buffer sharing mechanism
dma-buf: Documentation for buffer sharing framework
Documentation/dma-buf-sharing.txt | 210 ++++++++++++++++++++++++++++++++
drivers/base/Kconfig | 10 ++
drivers/base/Makefile | 1 +
drivers/base/dma-buf.c | 242 +++++++++++++++++++++++++++++++++++++
include/linux/dma-buf.h | 162 +++++++++++++++++++++++++
5 files changed, 625 insertions(+), 0 deletions(-)
create mode 100644 Documentation/dma-buf-sharing.txt
create mode 100644 drivers/base/dma-buf.c
create mode 100644 include/linux/dma-buf.h
--
1.7.4.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2011-10-11 9:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 9:23 Sumit Semwal [this message]
2011-10-11 9:23 ` [RFC 1/2] dma-buf: Introduce dma buffer sharing mechanism Sumit Semwal
2011-10-12 12:41 ` [Linaro-mm-sig] " Dave Airlie
2011-10-12 13:28 ` Rob Clark
2011-10-12 13:35 ` Dave Airlie
2011-10-12 13:50 ` Rob Clark
2011-10-12 14:01 ` Dave Airlie
2011-10-12 14:24 ` Rob Clark
2011-10-12 14:34 ` Dave Airlie
2011-10-12 14:49 ` Daniel Vetter
2011-10-12 15:15 ` Rob Clark
2011-10-14 10:00 ` Tomasz Stanislawski
2011-10-14 14:13 ` Sumit Semwal
2011-10-14 15:34 ` Rob Clark
2011-10-14 15:35 ` Daniel Vetter
2011-11-03 8:04 ` Marek Szyprowski
2011-11-08 16:59 ` Clark, Rob
2011-11-08 17:42 ` [RFC 1/2] dma-buf: Introduce dma buffer sharing mechanismch Daniel Vetter
2011-11-08 17:55 ` Russell King - ARM Linux
2011-11-08 18:43 ` Daniel Vetter
2011-11-28 7:47 ` Marek Szyprowski
2011-11-28 10:34 ` Daniel Vetter
2011-11-25 14:13 ` [Linaro-mm-sig] [RFC 1/2] dma-buf: Introduce dma buffer sharing mechanism Dave Airlie
2011-11-25 16:02 ` Daniel Vetter
2011-11-25 16:15 ` Dave Airlie
2011-11-25 16:28 ` Dave Airlie
2011-11-26 14:00 ` Daniel Vetter
2011-11-27 6:59 ` Rob Clark
2011-12-01 5:51 ` Semwal, Sumit
2011-12-01 5:55 ` Semwal, Sumit
2011-10-11 9:23 ` [RFC 2/2] dma-buf: Documentation for buffer sharing framework Sumit Semwal
2011-10-12 22:30 ` Randy Dunlap
2011-10-13 4:48 ` Semwal, Sumit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1318325033-32688-1-git-send-email-sumit.semwal@ti.com \
--to=sumit.semwal@ti.com \
--cc=arnd@arndb.de \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesse.barker@linaro.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@arm.linux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=rob@ti.com \
--cc=t.stanislaws@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).