From: Daniel Vetter <daniel@ffwll.ch>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "Semwal, Sumit" <sumit.semwal@ti.com>,
t.stanislaws@samsung.com, linaro-mm-sig@lists.linaro.org,
dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org
Subject: Re: [PATCH] dma-buf: add dma_data_direction to unmap dma_buf_op
Date: Tue, 31 Jan 2012 11:36:02 +0100 [thread overview]
Message-ID: <20120131103602.GD3911@phenom.ffwll.local> (raw)
In-Reply-To: <201201311042.59917.laurent.pinchart@ideasonboard.com>
On Tue, Jan 31, 2012 at 10:42:59AM +0100, Laurent Pinchart wrote:
> Hi Sumit,
>
> > On Friday 27 January 2012 10:43:28 Sumit Semwal wrote:
>
> [snip]
>
> > static inline void dma_buf_unmap_attachment(struct dma_buf_attachment
> > *attach,
> > - struct sg_table *sg)
> > + struct sg_table *sg, enum dma_data_direction write)
>
> On a second thought, would it make sense to store the direction in struct
> dma_buf_attachment in dma_buf_map_attachment(), and pass the value directly to
> the .unmap_dma_buf() instead of requiring the dma_buf_unmap_attachment()
> caller to remember it ? Or is an attachment allowed to map the buffer several
> times with different directions ?
Current dma api functions already require you to supply the direction
argument on unmap and I think for cpu access I'm also leaning towards an
interface where the importer has to supply the direction argument for both
begin_access and end_access. So for consistency reasons I'm leaning
towards adding it to unmap.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-01-31 10:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-27 9:43 [PATCH] dma-buf: add dma_data_direction to unmap dma_buf_op Sumit Semwal
2012-01-27 15:49 ` Daniel Vetter
2012-01-30 14:19 ` Laurent Pinchart
[not found] ` <CAB2ybb8RX5Sy7-s4-X2cLC9HcoTmsn_miYu0HysjHSU4aZ4BBw@mail.gmail.com>
2012-01-31 9:42 ` Laurent Pinchart
2012-01-31 10:36 ` Daniel Vetter [this message]
2012-02-02 10:04 ` Laurent Pinchart
-- strict thread matches above, loose matches on Subject: below --
2012-01-27 9:34 Sumit Semwal
2012-01-27 9:36 ` 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=20120131103602.GD3911@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=sumit.semwal@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