dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Liviu Dudau <Liviu.Dudau@arm.com>
To: Peter Collingbourne <pcc@google.com>
Cc: nd@arm.com, Emil Velikov <emil.l.velikov@gmail.com>,
	ML dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm: enable render nodes wherever buffer sharing is supported
Date: Wed, 29 Apr 2020 18:31:01 +0100	[thread overview]
Message-ID: <20200429173101.GI1985@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <CAMn1gO4ozMZQk3jN7iNGH5Cq-3jQd=d4vgVj-Zr35u3YRsMG0Q@mail.gmail.com>

On Wed, Apr 29, 2020 at 09:51:19AM -0700, Peter Collingbourne wrote:
> On Wed, Apr 29, 2020 at 9:17 AM Brian Starkey <brian.starkey@arm.com> wrote:
> >
> > Hi Peter,
> >
> > On Mon, Apr 27, 2020 at 01:05:13PM -0700, Peter Collingbourne wrote:
> > > Render nodes are not just useful for devices supporting GPU hardware
> > > acceleration. Even on devices that only support dumb frame buffers,
> > > they are useful in situations where composition (using software
> > > rasterization) and KMS are done in different processes with buffer
> > > sharing being used to send frame buffers between them. This is the
> > > situation on Android, where surfaceflinger is the compositor and the
> > > composer HAL uses KMS to display the buffers. Thus it is beneficial
> > > to expose render nodes on all devices that support buffer sharing.
> >
> > If I understand your problem right, the issue is that you're getting
> > your buffers in minigbm via pl111, which means you want a render node
> > just for buffer allocation? Then HWComposer will import those on the
> > primary node for displaying.
> 
> Correct.
> 
> > I'm not at all familiar with how minigbm sits in Android, but on our
> > platforms where the Display and GPU devices are different, we allocate
> > via ion in Gralloc, and import those into both the GPU and Display.
> > I think that should work on pl111 too - if you can allocate contiguous
> > memory from ion (or dma-buf heaps) in minigbm, then you don't need the
> > render node.
> 
> Those contiguous memory regions would not necessarily be compatible
> with the pl111 device as far as I know -- according to [1], on some
> devices, a designated memory region must be used for the framebuffer
> and therefore the memory region allocated in CMA would not be
> compatible. That being said, FVP doesn't appear to be one of those
> devices, so in principle that might work for FVP (provided that the
> user provides a sufficiently large cma=X kernel command line
> argument), but not for those other devices.

We have been doing that with mali-dp drivers for years. Because most of
our dev environments are on FPGAs, we needed to use the local RAM on
those boards so we've had to assign a memory region to the driver that
in turn was using CMA. We've made heavy use of 'reserved-memory' and
'memory-region' nodes in the DT to link the two together, but things
worked out quite well. Because the 'reserved-memory' sub-node was marked
as 'compatible="shared-dma-pool"', gralloc and ION could be used to
allocate memory from it.

Best regards,
Liviu

> 
> Peter
> 
> [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/display/arm%2Cpl11x.txt

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-04-29 17:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 22:34 [PATCH] drm: pl111: enable render node Peter Collingbourne
2020-04-24  4:29 ` Eric Anholt
2020-04-24 11:09 ` Emil Velikov
2020-04-24 18:53   ` Peter Collingbourne
2020-04-27 14:43     ` Emil Velikov
2020-04-27 15:58       ` Peter Collingbourne
2020-04-30 11:07         ` Emil Velikov
2020-04-27 16:47       ` Eric Anholt
2020-04-27 19:57         ` Peter Collingbourne
2020-04-27 20:05           ` [PATCH] drm: enable render nodes wherever buffer sharing is supported Peter Collingbourne
2020-04-27 20:47             ` Eric Anholt
2020-04-28  2:22               ` Peter Collingbourne
2020-04-28 11:48                 ` Liviu Dudau
2020-04-28 16:47                   ` Peter Collingbourne
2020-04-29 16:16             ` Brian Starkey
2020-04-29 16:51               ` Peter Collingbourne
2020-04-29 17:31                 ` Liviu Dudau [this message]
2020-04-30 10:30                   ` Brian Starkey
2020-04-30 10:44                     ` Daniel Vetter
2020-04-30 10:44             ` Daniel Vetter
2020-04-30 19:57               ` Eric Anholt
2020-05-04 11:51                 ` Daniel Vetter
2020-04-28 15:05         ` [PATCH] drm: pl111: enable render node Daniel Vetter
2020-04-30 10:50         ` Emil Velikov

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=20200429173101.GI1985@e110455-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=nd@arm.com \
    --cc=pcc@google.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