From: airlied@gmail.com (Dave Airlie)
To: linux-arm-kernel@lists.infradead.org
Subject: [Linaro-mm-sig] [RFC 1/2] dma-buf: Introduce dma buffer sharing mechanism
Date: Wed, 12 Oct 2011 14:35:45 +0100 [thread overview]
Message-ID: <CAPM=9twft0eBEUoCD11a2gTZHwOaPzFmZvBfE032dfK10eQ27Q@mail.gmail.com> (raw)
In-Reply-To: <CAF6AEGs6kkGp85NoNVuq5W9i=WE86V8wvAtKydX=D3bQOc+6Pw@mail.gmail.com>
>
> well, the mmap is actually implemented by the buffer allocator
> (v4l/drm).. although not sure if this was the point
Then why not use the correct interface? doing some sort of not-quite
generic interface isn't really helping anyone except adding an ABI
that we have to support.
If someone wants to bypass the current kernel APIs we should add a new
API for them not shove it into this generic buffer sharing layer.
> The intent was that this is for well defined formats.. ie. it would
> need to be a format that both v4l and drm understood in the first
> place for sharing to make sense at all..
How will you know the stride to take a simple example? The userspace
had to create this buffer somehow and wants to share it with
"something", you sound like
you really needs another API that is a simple accessor API that can
handle mmaps.
> Anyways, the basic reason is to handle random edge cases where you
> need sw access to the buffer. ?For example, you are decoding video and
> pull out a frame to generate a thumbnail w/ a sw jpeg encoder..
Again, doesn't sound like it should be part of this API, and also
sounds like the sw jpeg encoder will need more info about the buffer
anyways like stride and format.
> With this current scheme, synchronization could be handled in
> dmabufops->mmap() and vm_ops->close().. ?it is perhaps a bit heavy to
> require mmap/munmap for each sw access, but I suppose this isn't
> really for the high-performance use case. ?It is just so that some
> random bit of sw that gets passed a dmabuf handle without knowing who
> allocated it can have sw access if really needed.
So I think thats fine, write a sw accessor providers, don't go
overloading the buffer sharing code.
This API will limit what people can use this buffer sharing for with
pure hw accessors, you might say, oh buts its okay to fail the mmap
then, but the chances of sw handling that I'm not so sure off.
Dave.
next prev parent reply other threads:[~2011-10-12 13:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 9:23 [RFC 0/2] Introduce dma buffer sharing mechanism Sumit Semwal
[not found] ` <1318325033-32688-3-git-send-email-sumit.semwal@ti.com>
2011-10-12 22:30 ` [RFC 2/2] dma-buf: Documentation for buffer sharing framework Randy Dunlap
2011-10-13 4:48 ` Semwal, Sumit
[not found] ` <1318325033-32688-2-git-send-email-sumit.semwal@ti.com>
2011-10-12 12:41 ` [Linaro-mm-sig] [RFC 1/2] dma-buf: Introduce dma buffer sharing mechanism Dave Airlie
2011-10-12 13:28 ` Rob Clark
2011-10-12 13:35 ` Dave Airlie [this message]
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
[not found] ` <CAB2ybb9Ti-2iz_qDfzMSgDhpUc6UOtGS8wi52nQaxhB-gH=azg@mail.gmail.com>
2011-12-01 5:55 ` 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='CAPM=9twft0eBEUoCD11a2gTZHwOaPzFmZvBfE032dfK10eQ27Q@mail.gmail.com' \
--to=airlied@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).