From: Sakari Ailus <sakari.ailus@iki.fi>
To: "Clark, Rob" <rob@ti.com>
Cc: Daniel Vetter <daniel@ffwll.ch>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Tomasz Stanislawski <t.stanislaws@samsung.com>,
Sumit Semwal <sumit.semwal@linaro.org>,
Pawel Osciak <pawel@osciak.com>,
Sumit Semwal <sumit.semwal@ti.com>,
linaro-mm-sig@lists.linaro.org, linux-media@vger.kernel.org,
arnd@arndb.de, jesse.barker@linaro.org, patches@linaro.org
Subject: Re: [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf)
Date: Sat, 04 Feb 2012 13:43:30 +0200 [thread overview]
Message-ID: <4F2D19E2.7060309@iki.fi> (raw)
In-Reply-To: <CAO8GWqmxZbyrZoc-35RGpREJ7Z0ixQ3L+1xBkdhGbYT_31t-Og@mail.gmail.com>
Hi Rob,
Clark, Rob wrote:
> On Mon, Jan 30, 2012 at 4:01 PM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
>>
>>> So to summarize I understand your constraints - gpu drivers have worked
>>> like v4l a few years ago. The thing I'm trying to achieve with this
>>> constant yelling is just to raise awereness for these issues so that
>>> people aren't suprised when drm starts pulling tricks on dma_bufs.
>>
>> I think we should be able to mark dma_bufs non-relocatable so also DRM can
>> work with these buffers. Or alternatively, as Laurent proposed, V4L2 be
>> prepared for moving the buffers around. Are there other reasons to do so
>> than paging them out of system memory to make room for something else?
>
> fwiw, from GPU perspective, the DRM device wouldn't be actively
> relocating buffers just for the fun of it. I think it is more that we
> want to give the GPU driver the flexibility to relocate when it really
> needs to. For example, maybe user has camera app running, then puts
> it in the background and opens firefox which tries to allocate a big
> set of pixmaps putting pressure on GPU memory..
>
> I guess the root issue is who is doing the IOMMU programming for the
> camera driver. I guess if this is something built in to the camera
> driver then when it calls dma_buf_map() it probably wants some hint
> that the backing pages haven't moved so in the common case (ie. buffer
> hasn't moved) it doesn't have to do anything expensive.
>
> On omap4 v4l2+drm example I have running, it is actually the DRM
> driver doing the "IOMMU" programming.. so v4l2 camera really doesn't
> need to care about it. (And the IOMMU programming here is pretty
This part sounds odd to me. Well, I guess it _could_ be done that way,
but the ISP IOMMU could be as well different as the one in DRM. That's
the case on OMAP 3, for example.
> fast.) But I suppose this maybe doesn't represent all cases. I
> suppose if a camera didn't really sit behind an IOMMU but uses
> something more like a DMA descriptor list would want to know if it
> needed to regenerate it's descriptor list. Or likewise if camera has
> an IOMMU that isn't really using the IOMMU framework (although maybe
> that is easier to solve). But I think a hint returned from
> dma_buf_map() would do the job?
An alternative to IOMMU I think in practice would mean CMA-allocated
buffers.
I need to think about this a bit and understand how this would really
work to properly comment this.
For example, how does one mlock() something that isn't mapped to process
memory --- think of a dma buffer not mapped to the user space process
address space?
Cheers,
--
Sakari Ailus
sakari.ailus@iki.fi
next prev parent reply other threads:[~2012-02-04 11:43 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 10:41 [RFCv1 0/4] v4l: DMA buffer sharing support as a user Sumit Semwal
2012-01-05 10:41 ` [RFCv1 1/4] v4l: Add DMABUF as a memory type Sumit Semwal
2012-01-05 10:41 ` [RFCv1 2/4] v4l:vb2: add support for shared buffer (dma_buf) Sumit Semwal
2012-01-14 20:38 ` [Linaro-mm-sig] " Sakari Ailus
[not found] ` <CAB2ybb83ub=A45-m6o+RXqFOTUmXCgeFqs03WZDHeWeLe2+29w@mail.gmail.com>
2012-01-16 5:35 ` Semwal, Sumit
2012-01-20 15:04 ` Laurent Pinchart
2012-01-19 19:07 ` Pawel Osciak
2012-01-20 10:41 ` Sumit Semwal
2012-01-20 10:58 ` Tomasz Stanislawski
2012-01-20 15:12 ` Laurent Pinchart
2012-01-20 15:53 ` Tomasz Stanislawski
2012-01-20 16:11 ` Laurent Pinchart
2012-01-20 16:20 ` Tomasz Stanislawski
2012-01-20 16:28 ` Laurent Pinchart
2012-01-23 9:06 ` Marek Szyprowski
2012-01-23 9:40 ` Daniel Vetter
2012-01-23 9:45 ` Daniel Vetter
2012-01-23 9:48 ` Laurent Pinchart
2012-01-23 10:35 ` Daniel Vetter
2012-01-23 10:54 ` Laurent Pinchart
2012-01-24 0:26 ` Clark, Rob
2012-01-24 9:34 ` Laurent Pinchart
2012-01-24 10:52 ` Daniel Vetter
2012-01-24 13:03 ` Daniel Vetter
2012-01-25 8:09 ` Daniel Vetter
2012-01-30 14:44 ` Laurent Pinchart
2012-01-30 16:29 ` Daniel Vetter
2012-01-25 23:28 ` Sakari Ailus
2012-01-26 11:27 ` Daniel Vetter
2012-01-29 11:03 ` Sakari Ailus
2012-01-29 13:03 ` Daniel Vetter
2012-01-30 14:33 ` Laurent Pinchart
2012-01-30 22:01 ` Sakari Ailus
2012-01-31 15:38 ` Clark, Rob
2012-02-02 10:19 ` Laurent Pinchart
2012-02-02 14:01 ` Clark, Rob
2012-02-02 14:40 ` Sumit Semwal
2012-02-02 20:23 ` Daniel Vetter
2012-02-02 20:49 ` Clark, Rob
2012-02-04 11:43 ` Sakari Ailus [this message]
2012-02-05 15:08 ` Clark, Rob
2012-01-20 14:55 ` [Linaro-mm-sig] " Laurent Pinchart
2012-01-05 10:41 ` [RFCv1 3/4] v4l:vb: remove warnings about MEMORY_DMABUF Sumit Semwal
2012-01-05 10:41 ` [RFCv1 4/4] v4l:vb2: Add dma-contig allocator as dma_buf user Sumit Semwal
2012-01-16 7:57 ` [RFCv1 0/4] v4l: DMA buffer sharing support as a user Kyungmin Park
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=4F2D19E2.7060309@iki.fi \
--to=sakari.ailus@iki.fi \
--cc=arnd@arndb.de \
--cc=daniel@ffwll.ch \
--cc=jesse.barker@linaro.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=patches@linaro.org \
--cc=pawel@osciak.com \
--cc=rob@ti.com \
--cc=sumit.semwal@linaro.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 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.