From: olof@lixom.net (Olof Johansson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 2/3] drivers: of: add initialization code for dma reserved memory
Date: Thu, 15 Aug 2013 22:25:20 -0700 [thread overview]
Message-ID: <20130816052520.GA7035@quad.lixom.net> (raw)
In-Reply-To: <520A924C.6070309@wwwdotorg.org>
On Tue, Aug 13, 2013 at 02:08:44PM -0600, Stephen Warren wrote:
> On 08/09/2013 05:51 AM, Marek Szyprowski wrote:
> > Add device tree support for contiguous and reserved memory regions
> > defined in device tree. Initialization is done in 2 steps. First, the
> > memory is reserved, what happens very early when only flattened device
> > tree is available. Then on device initialization the corresponding cma
> > and reserved regions are assigned to each device structure.
>
> Hmmm. This seems an awful lot like putting SW configuration/policy
> information into DT rather than HW description. This feels like a
> slippery slope... Isn't this kind of thing better handled by a kernel
> command-line option to set up the CMA size?
Sorry, you were not part of the in-person discussion since it happened
at Linaro Connect in Dublin. The concern is that we really need a way
to describe some of these _system_ properties. They're not necessarily
hardware properties, but they are well-known and likely properties of
the system that is running.
I.e. say you have a device with a known screen resolution running some
reasonably well-known software stacks/applications that you expect
will use a certain amount of graphics memory. Or you know how large
your camera sensor is, so you know how much carveout the ISP will need
for captures. So defining how large the default carveouts should be
is very much a property of this system. We would previously have put
these settings in a board file and be done, but now we need a way to
describe it.
/chosen was proposed, but that's mostly used for things that the
sysadmin would adjust (traditionally such as firmware stdin/stdout, etc).
/options isn't a good place either.
Having them on the command line doesn't really work well, over time
we'll start to accumulate cruft there. It's bad enough for some of the
devices out there that do it, I'd say.
So, for the specific case of memory carveouts, this was suggested as the best
way forward.
-Olof
next prev parent reply other threads:[~2013-08-16 5:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-09 11:51 [PATCH v5 0/3] Device Tree support for CMA (Contiguous Memory Allocator) Marek Szyprowski
2013-08-09 11:51 ` [PATCH v5 1/3] drivers: dma-contiguous: clean source code and prepare for device tree Marek Szyprowski
2013-08-09 11:51 ` [PATCH v5 2/3] drivers: of: add initialization code for dma reserved memory Marek Szyprowski
2013-08-10 17:33 ` Rob Herring
2013-08-12 8:34 ` Marek Szyprowski
2013-08-13 13:00 ` Rob Herring
2013-08-19 14:47 ` Marek Szyprowski
2013-08-19 19:36 ` Rob Herring
2013-08-13 20:08 ` Stephen Warren
2013-08-16 5:25 ` Olof Johansson [this message]
2013-08-16 16:06 ` Stephen Warren
2013-08-16 5:32 ` Olof Johansson
2013-08-09 11:51 ` [PATCH v5 3/3] ARM: init: add support for reserved memory defined by device tree Marek Szyprowski
2013-08-09 13:19 ` [PATCH v5 0/3] Device Tree support for CMA (Contiguous Memory Allocator) Tomasz Figa
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=20130816052520.GA7035@quad.lixom.net \
--to=olof@lixom.net \
--cc=linux-arm-kernel@lists.infradead.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.