From: "Semwal, Sumit" <sumit.semwal@ti.com>
To: Tomasz Stanislawski <t.stanislaws@samsung.com>,
Sumit Semwal <sumit.semwal@ti.com>,
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, arnd@arndb.de, airlied@redhat.com,
linux@arm.linux.org.uk, jesse.barker@linaro.org,
m.szyprowski@samsung.com, rob@ti.com, patches@linaro.org,
Sumit Semwal <sumit.semwal@linaro.org>
Cc: daniel@ffwll.ch
Subject: Re: [PATCH 1/3] dma-buf: Introduce dma buffer sharing mechanism
Date: Thu, 26 Jan 2012 11:05:30 +0530 [thread overview]
Message-ID: <CAB2ybb_5Co38kpahe5PmO5b_uevr0=_3ODnwD1Xy9V0HQ7mPwg@mail.gmail.com> (raw)
In-Reply-To: <20120125200701.GH3896@phenom.ffwll.local>
On Thu, Jan 26, 2012 at 1:37 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Jan 25, 2012 at 06:02:41PM +0100, Tomasz Stanislawski wrote:
>> Hi Sumit,
>>
>> On 12/26/2011 10:23 AM, Sumit Semwal wrote:
>> >This is the first step in defining a dma buffer sharing mechanism.
>> >
>> [snip]
>>
>> >+struct sg_table *dma_buf_map_attachment(struct dma_buf_attachment *,
>> >+ enum dma_data_direction);
>> >+void dma_buf_unmap_attachment(struct dma_buf_attachment *, struct sg_table *);
>>
>> I think that you should add enum dma_data_direction as an argument
>> unmap function. It was mentioned that the dma_buf_attachment should keep
>> cached and mapped sg_table for performance reasons. The field
>> dma_buf_attachment::priv seams to be a natural place to keep this sg_table.
>> To map a buffer the exporter calls dma_map_sg. It needs dma direction
>> as an argument. The problem is that dma_unmap_sg also needs this
>> argument but dma direction is not available neither in
>> dma_buf_unmap_attachment nor in unmap callback. Therefore the exporter
>> is forced to embed returned sg_table into a bigger structure where
>> dma direction is remembered. Refer to function vb2_dc_dmabuf_ops_map
>> at
>
> Oops, makes sense. I've totally overlooked that we need to pass in the dma
> direction also for the unmap call to the dma subsystem. Sumit, can you
> stitch together that small patch?
Right, of course. I will do that by tomorrow; it is a bank holiday
today here in India, so.
regards,
~Sumit.
> -Daniel
> --
> Daniel Vetter
> Mail: daniel@ffwll.ch
> Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-01-26 5:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-26 9:23 [PATCH 0/3] Introduce DMA buffer sharing mechanism Sumit Semwal
2011-12-26 9:23 ` [PATCH 1/3] dma-buf: Introduce dma " Sumit Semwal
2011-12-28 2:27 ` InKi Dae
2012-01-20 13:23 ` [Linaro-mm-sig] " Laurent Pinchart
2012-01-25 13:56 ` Semwal, Sumit
2012-01-26 9:58 ` Laurent Pinchart
2012-01-25 17:02 ` Tomasz Stanislawski
2012-01-25 20:07 ` Daniel Vetter
2012-01-26 5:35 ` Semwal, Sumit [this message]
2011-12-26 9:23 ` [PATCH 2/3] dma-buf: Documentation for buffer sharing framework Sumit Semwal
2012-01-01 20:09 ` Sakari Ailus
2012-01-01 23:02 ` Rob Clark
2011-12-26 9:23 ` [PATCH 3/3] dma-buf: mark EXPERIMENTAL for 1st release Sumit Semwal
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='CAB2ybb_5Co38kpahe5PmO5b_uevr0=_3ODnwD1Xy9V0HQ7mPwg@mail.gmail.com' \
--to=sumit.semwal@ti.com \
--cc=airlied@redhat.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=patches@linaro.org \
--cc=rob@ti.com \
--cc=sumit.semwal@linaro.org \
--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).