All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Rob Clark <rob.clark@linaro.org>
Cc: Greg KH <greg@kroah.com>,
	linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org,
	patches@linaro.org
Subject: Re: [PATCH] omap2+: add drm device
Date: Wed, 07 Mar 2012 13:59:59 +0200	[thread overview]
Message-ID: <1331121599.4348.22.camel@deskari> (raw)
In-Reply-To: <CAF6AEGvtGjgw+uEKTu34ukXNqZ-+gS6pQtv2oFM11X8ik1zY5w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3362 bytes --]

On Tue, 2012-03-06 at 09:29 -0600, Rob Clark wrote:
> On Tue, Mar 6, 2012 at 8:35 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> > On Tue, 2012-03-06 at 08:01 -0600, Rob Clark wrote:
> >> On Tue, Mar 6, 2012 at 7:26 AM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> >
> >> > Can there be more than one omapdrm device? I guess not. If so, the id
> >> > should be -1.
> >>
> >> in the past, we have used multiple devices (using the platform-data to
> >> divide up the dss resources), although this was sort of a
> >> special-case.  But in theory you could have multiple.  (Think of a
> >> multi-seat scenario, where multiple compositors need to run and each
> >> need to be drm-master of their own device to do mode-setting on their
> >> corresponding display.)
> >>
> >> I think if we use .id = -1, then we'd end up with a funny looking
> >> bus-id for the device: "platform:omapdrm:-1"
> >
> > I don't know about that, but it's the way platform devices are meant to
> > be used if there can be only one instance. If the case where there are
> > multiple omapdrm devices is rather theoretical, or only used for certain
> > debugging scenarios or such, I think having the id as -1 in the mainline
> > is cleaner.
> 
> well, I don't care much one way or another, but need to check if there
> is a small patch needed in drm core code that generates the bus-id for
> .id = -1..

Hmm, why does the drm core care about it?

And generally, I think if the bus id is -1, there is no bus id in a
sense. For example, with bus id 0 you'll get a device "omapdrm.0". With
bus id -1 you'll get a device "omapdrm".

> >> >> +arch_initcall(omap_init_gpu);
> >> >> +
> >> >> +void omapdrm_reserve_vram(void)
> >> >> +{
> >> >> +#ifdef CONFIG_CMA
> >> >> +     /*
> >> >> +      * Create private 32MiB contiguous memory area for omapdrm.0 device
> >> >> +      * TODO revisit size.. if uc/wc buffers are allocated from CMA pages
> >> >> +      * then the amount of memory we need goes up..
> >> >> +      */
> >> >> +     dma_declare_contiguous(&omap_drm_device.dev, 32 * SZ_1M, 0, 0);
> >> >
> >> > What does this actually do? Does it reserve the memory, i.e. it's not
> >> > usable for others? If so, shouldn't there be a way for the user to
> >> > configure it?
> >>
> >> It can be re-used by others.. see http://lwn.net/Articles/479297/
> >
> > The link didn't tell much. I looked at the patches, and
> > dma_declare_contiguous allocates the memory with memblock_alloc. So is
> > that allocated memory available for any users? If so, why does the
> > function want a device pointer as an argument...
> >
> > Is the memory available for normal kmalloc, or only available via the
> > CMA functions? Surely there must be some downside to the above? =) And
> > if so, it should be configurable. You could have a board with no display
> > at all, and you probably don't want to have 32MB allocated for DRM in
> > that case.
> 
> Basically the short version is memory from a CMA carveout can be
> re-used for unpinnable memory.  Not kmalloc, but it can be used for
> anon userspace pages, for example.  Userspace needs memory too.

Okay, let me ask the other way. Is 32MB enough for everyone? Hardcoding
a value like that without any possibility to adjust it just sounds like
a rather bad thing.

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-03-07 12:00 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 16:54 [PATCH] omap2+: add drm device Rob Clark
2012-03-06  0:10 ` Tony Lindgren
2012-03-06  1:42   ` Rob Clark
2012-03-06 13:26 ` Tomi Valkeinen
2012-03-06 14:01   ` Rob Clark
2012-03-06 14:35     ` Tomi Valkeinen
2012-03-06 15:29       ` Rob Clark
2012-03-07 11:59         ` Tomi Valkeinen [this message]
2012-03-07 13:06           ` Rob Clark
2012-03-07 13:11             ` Tomi Valkeinen
2012-03-06 15:50       ` Gross, Andy
2012-03-07 12:05         ` Tomi Valkeinen
2012-03-07 13:27           ` Rob Clark
2012-03-07 15:59           ` Gross, Andy
2012-03-08  7:47             ` Tomi Valkeinen
  -- strict thread matches above, loose matches on Subject: below --
2012-05-23 20:08 Andy Gross
2012-05-24  6:01 ` Tomi Valkeinen
2012-05-24  6:27   ` Clark, Rob
2012-05-24  7:05     ` Tomi Valkeinen
2012-05-24  7:21       ` Tomi Valkeinen
2012-05-24  8:44         ` Rob Clark
2012-05-24 12:13           ` Tomi Valkeinen
2012-05-24 15:09             ` Gross, Andy
2012-05-24 15:26               ` Tomi Valkeinen
2012-06-11 14:51                 ` Gross, Andy
2012-06-11 14:54                   ` Gross, Andy
2012-06-11 15:05                   ` Tomi Valkeinen
2012-05-24  8:35       ` Rob Clark
2012-05-24 12:10         ` Tomi Valkeinen
2012-05-24 14:22   ` Gross, Andy
2012-06-11 15:51 ` Rob Clark
2012-06-19 21:12   ` Gross, Andy
2012-07-03  7:09     ` Tony Lindgren
2012-03-13 20:34 Rob Clark
2012-03-14 12:38 ` Tomi Valkeinen
2012-03-14 12:55   ` Rob Clark
2012-03-14 13:07     ` Tomi Valkeinen
2012-03-14 13:16       ` Rob Clark
2012-03-14 13:43         ` Tomi Valkeinen
2012-03-14 15:06           ` Rob Clark
2012-03-15  8:46             ` Tomi Valkeinen
2012-03-15 12:32               ` Rob Clark
2012-03-16 11:03                 ` Tomi Valkeinen
2012-01-13 19:41 Rob Clark
2012-01-13 19:46 ` Rob Clark
2012-01-13 19:49   ` Felipe Contreras
2012-01-13 19:53     ` Rob Clark
2012-01-13 20:23       ` Felipe Contreras
2012-01-13 20:25         ` Rob Clark
2012-01-13 19:51 ` Aguirre, Sergio
2012-01-13 19:54   ` Rob Clark
2012-01-13 20:29 ` Felipe Contreras

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=1331121599.4348.22.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=greg@kroah.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=rob.clark@linaro.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.