From: Chris Wilson <chris@chris-wilson.co.uk>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
linaro-mm-sig@lists.linaro.org,
LKML <linux-kernel@vger.kernel.org>,
DRI Development <dri-devel@lists.freedesktop.org>,
linux-media@vger.kernel.org
Subject: Re: [Linaro-mm-sig] [PATCH 2/3] dma-buf: add support for kernel cpu access
Date: Fri, 02 Mar 2012 22:38:58 +0000 [thread overview]
Message-ID: <e39f63$3uf6dn@fmsmga002.fm.intel.com> (raw)
In-Reply-To: <1330616161-1937-3-git-send-email-daniel.vetter@ffwll.ch>
On Thu, 1 Mar 2012 16:36:00 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Big differences to other contenders in the field (like ion) is
> that this also supports highmem, so we have to split up the cpu
> access from the kernel side into a prepare and a kmap step.
>
> Prepare is allowed to fail and should do everything required so that
> the kmap calls can succeed (like swapin/backing storage allocation,
> flushing, ...).
>
> More in-depth explanations will follow in the follow-up documentation
> patch.
>
> Changes in v2:
>
> - Clear up begin_cpu_access confusion noticed by Sumit Semwal.
> - Don't automatically fallback from the _atomic variants to the
> non-atomic variants. The _atomic callbacks are not allowed to
> sleep, so we want exporters to make this decision explicit. The
> function signatures are explicit, so simpler exporters can still
> use the same function for both.
> - Make the unmap functions optional. Simpler exporters with permanent
> mappings don't need to do anything at unmap time.
Are we going to have to have a dma_buf->ops->begin_async_access(&me, dir)
variant for coherency control of rendering with an imported dma_buf?
There is also no concurrency control here between multiple importers
doing simultaneous begin_cpu_access(). I presume that is going to be a
common function across all exporters so the midlayer might offer a
semaphore as a library function and then the
dma_buf->ops->begin_cpu_access() becomes mandatory as at a minimum it
has to point to the default implementation.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-03-02 22:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-01 15:35 [PATCH 0/3] [RFC] kernel cpu access support for dma_buf Daniel Vetter
2012-03-01 15:35 ` [PATCH 1/3] dma-buf: don't hold the mutex around map/unmap calls Daniel Vetter
2012-03-02 21:26 ` Rob Clark
2012-03-01 15:36 ` [PATCH 2/3] dma-buf: add support for kernel cpu access Daniel Vetter
2012-03-02 22:24 ` Rob Clark
2012-03-05 18:57 ` Daniel Vetter
2012-03-06 10:33 ` Semwal, Sumit
2012-03-02 22:38 ` Chris Wilson [this message]
2012-03-02 22:53 ` [Linaro-mm-sig] " Rob Clark
2012-03-05 21:31 ` Daniel Vetter
2012-03-01 15:36 ` [PATCH 3/3] dma_buf: Add documentation for the new cpu access support Daniel Vetter
2012-03-02 22:34 ` Rob Clark
2012-03-03 0:23 ` Sakari Ailus
2012-03-05 18:48 ` [Linaro-mm-sig] " Clark, Rob
2012-03-05 21:39 ` Daniel Vetter
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='e39f63$3uf6dn@fmsmga002.fm.intel.com' \
--to=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.