All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: "Clark, Rob" <rob@ti.com>
Cc: Jordan Crouse <jcrouse@codeaurora.org>,
	"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
	Tomasz Stanislawski <t.stanislaws@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [Linaro-mm-sig] Buffer sharing proof-of-concept
Date: Thu, 4 Aug 2011 14:34:13 +0200	[thread overview]
Message-ID: <CAKMK7uG+UVynCQx-0AWXV8KM9Fe5unu0-9exaADTGrpAcMxHng@mail.gmail.com> (raw)
In-Reply-To: <CAO8GWq=6djefOgQGWf4fkRryWM2e7qOMA5qeZOGkUVx7VWf-wg@mail.gmail.com>

On Thu, Aug 4, 2011 at 13:14, Clark, Rob <rob@ti.com> wrote:
> hmm, there would be a dmabuf->private ptr in struct dmabuf.  Normally
> that should be for private data of the buffer allocator, but I guess
> it could be (ab)used for under the hood communication between drivers
> a platform specific way.  It does seem a bit hacky, but at least it
> does not need to be exposed to userspace.

An idea that just crossed my mind: I think we should seperate two
kinds of meta-data about a shared piece of data (dmabuf):
- logical metadata about it's contents, like strides, number of
dimensions, pixel format/vbo layout, ... Imo that stuff doesn't belong
into the buffer sharing simply because it's an a) awful mess and b)
gem doesn't know it. To recap: only userspace knows this stuff and has
to make sense of the data in the buffer by either setting up correct
gpu command streams or telling kms what format this thing it needs to
scan out has.
- metadata about the physical layout: tiling layout, memory bank
interleaving, page size for the iommu/contiguous buffer. As far as I
can tell (i.e. please correct) for embedded systems this just depends
on the (in)saneness of to iommu/bus/memory controller sitting between
the ic block and it's data. So it would be great if we could
completely hide this from drivers (and userspace) an shovel it into
the dma subsystem (as private data). Unfortunately at least on Intel
tiling needs to be known by the iommu code, the core gem kernel driver
code and the userspace drivers. Otoh using tiled buffers for sharing
is maybe a bit ambitious for the first cut. So maybe we can just
ignore tiling which largely just leaves handling iommus restrictions
(or their complete lack) which looks doable.

> (Or maybe a better option is just 'rm -rf omx' ;-))

Yeah ;-)
-Daniel
-- 
Daniel Vetter
daniel.vetter@ffwll.ch - +41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2011-08-04 12:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02  9:48 Buffer sharing proof-of-concept Marek Szyprowski
2011-08-02  9:49 ` [PATCH 1/6] drivers: base: add shared buffer framework Marek Szyprowski
2011-08-02 18:09   ` [Linaro-mm-sig] " Clark, Rob
2011-08-02  9:50 ` [PATCH 2/6] v4l: add buffer exporting via shrbuf Marek Szyprowski
2011-08-02  9:52 ` [PATCH 3/6] v4l: vb2: add support for shared buffer (shrbuf) Marek Szyprowski
2011-08-02  9:53 ` [PATCH 4/6] v4l: vb2: integrate dma-contig allocator with shrbuf Marek Szyprowski
2011-08-02  9:53 ` [PATCH 5/6] v4l: fimc: integrate capture i-face " Marek Szyprowski
2011-08-02  9:54 ` [PATCH 6/6] v4l: s5p-tv: mixer: integrate " Marek Szyprowski
2011-08-02 11:59 ` [Linaro-mm-sig] Buffer sharing proof-of-concept KyongHo Cho
2011-08-02 14:48   ` Marek Szyprowski
2011-08-02 15:44 ` Jordan Crouse
2011-08-03  9:33   ` Tom Cooksey
2011-08-03 15:12     ` Jordan Crouse
2011-08-04  8:58       ` Daniel Vetter
2011-08-04 11:14         ` Clark, Rob
2011-08-04 12:34           ` Daniel Vetter [this message]
2011-08-04 16:19             ` Clark, Rob

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=CAKMK7uG+UVynCQx-0AWXV8KM9Fe5unu0-9exaADTGrpAcMxHng@mail.gmail.com \
    --to=daniel.vetter@ffwll.ch \
    --cc=jcrouse@codeaurora.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=rob@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.