devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Rob Herring <robh@kernel.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	patchwork-lst@pengutronix.de,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	Russell King <rmk+kernel@arm.linux.org.uk>,
	Shawn Guo <shawnguo@kernel.org>
Subject: Re: [PATCH 02/12] drm/etnaviv: add devicetree bindings
Date: Sat, 05 Dec 2015 12:26:19 +0100	[thread overview]
Message-ID: <1449314779.2702.17.camel@pengutronix.de> (raw)
In-Reply-To: <CAL_Jsq+oaJxD3vbDWzn_4ghpqi=RZ1o+8nOcepWYjzcu5Hwpjg@mail.gmail.com>

Am Freitag, den 04.12.2015, 14:19 -0600 schrieb Rob Herring:
> On Fri, Dec 4, 2015 at 11:56 AM, Lucas Stach <l.stach@pengutronix.de>
> wrote:
> > Am Freitag, den 04.12.2015, 11:33 -0600 schrieb Rob Herring:
> > > On Fri, Dec 4, 2015 at 10:41 AM, Lucas Stach <l.stach@pengutronix
> > > .de> wrote:
> > > > Am Freitag, den 04.12.2015, 10:29 -0600 schrieb Rob Herring:
> > > > > On Fri, Dec 04, 2015 at 02:59:54PM +0100, Lucas Stach wrote:
> > > > > > Etnaviv follows the same priciple as imx-drm to have a
> > > > > > virtual
> > > > > > master device node to bind all the individual GPU cores
> > > > > > together
> > > > > > into one DRM device.
> > > > > > 
> > > > > > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> > > > > > ---
> > > > > >  .../bindings/display/etnaviv/etnaviv-drm.txt       | 46
> > > > > > ++++++++++++++++++++++
> > > > > >  1 file changed, 46 insertions(+)
> > > > > >  create mode 100644
> > > > > > Documentation/devicetree/bindings/display/etnaviv/etnaviv-
> > > > > > drm.txt
> > > > > > 
> > > > > > diff --git
> > > > > > a/Documentation/devicetree/bindings/display/etnaviv/etnaviv
> > > > > > -drm.txt
> > > > > > b/Documentation/devicetree/bindings/display/etnaviv/etnaviv
> > > > > > -drm.txt
> > > > > > new file mode 100644
> > > > > > index 000000000000..19fde29dc1d7
> > > > > > --- /dev/null
> > > > > > +++
> > > > > > b/Documentation/devicetree/bindings/display/etnaviv/etnaviv
> > > > > > -drm.txt
> > > > > > @@ -0,0 +1,46 @@
> > > > > > +Etnaviv DRM master device
> > > > > > +================================
> > > > > > +
> > > > > > +The Etnaviv DRM master device is a virtual device needed
> > > > > > to list all
> > > > > > +Vivante GPU cores that comprise the GPU subsystem.
> > > > > > +
> > > > > > +Required properties:
> > > > > > +- compatible: Should be one of
> > > > > > +    "fsl,imx-gpu-subsystem"
> > > > > > +    "marvell,dove-gpu-subsystem"
> > > > > > +- cores: Should contain a list of phandles pointing to
> > > > > > Vivante GPU devices
> > > > > > +
> > > > > > +example:
> > > > > > +
> > > > > > +gpu-subsystem {
> > > > > > +   compatible = "fsl,imx-gpu-subsystem";
> > > > > > +   cores = <&gpu_2d>, <&gpu_3d>;
> > > > > > +};
> > > > > 
> > > > > Yeah, I'm not really a fan of doing this simply because DRM
> > > > > wants 1
> > > > > driver.
> > > > > 
> > > > I'm aware of that, but I don't see much value in kicking this
> > > > discussion
> > > > around for every DRM driver submission. This is the binding
> > > > that has
> > > > emerged from a lengthy discussion at KS 2013 in Edinburgh and
> > > > at least
> > > > allows us to standardize on _something_. Also ALSA does a
> > > > similar thing
> > > > to bind codecs and CPU interfaces together.
> > > 
> > > This case is quite different though I think. The ALSA case and
> > > other
> > > DRM cases are ones that have inter-dependencies between the
> > > blocks
> > > (e.g. some sort of h/w connection). What is the inter-dependency
> > > here?
> > > 
> > > Doing this way has also been found to be completely unnecessary
> > > and
> > > removed in recent DRM driver reviews. Admittedly, those are cases
> > > where one device can be the master of the others. For 2 parallel
> > > devices, I don't have an alternative other than question why they
> > > need
> > > to be a single driver.
> > > 
> > If you insist on doing things differently for this driver, we could
> > add
> > a pass at driver registration that scans through the DT, looking
> > for
> > nodes matching the GPU core compatible.
> 
> I've not insisted on anything. I'm only asking a question which
> didn't
> get answered. I'll ask another way. Why can't you have 2 instances of
> the same driver given they are only rendering nodes?
> 
> > I'm not sure if that makes things cleaner though and might bite us
> > later
> > on. Also I'm not sure if moving away from the binding scheme
> > already
> > established for other DRM drivers makes things better from a DT
> > perspective. Personally I would prefer DT binding consistency over
> > perfection for single drivers, segmenting the DT binding space.
> 
> This is the least of our issues in terms of consistency among
> drivers,
> but that is in fact what I'm pushing for. This is probably the first
> case of a render only driver (at least for DT). So this isn't a case
> of just follow what others are doing.
> 
> The h/w in this area can be quite different, so the DT bindings are
> going to reflect that to some extent. A virtual node makes sense in
> some cases, but for others it may not.
> 
I see where you are going here and I appreciate that this discussion
isn't a exercise in bikeshed, but based on technical facts.

So let me try to explain things from the other way around:
We made the decision to have a single DRM device for all the Vivante
GPU nodes in a system based on technical merits, not because DRM wants
us to do this, but because it has practical upsides for the
implementation of the driver.

1. It makes buffer and management and information sharing between the
cores that are likely to be used together vastly easier for the use-
cases seen today. Having one DRM device per core would be possible, but
would make things a lot harder implementation wise.

2. It will allow us to share resources such as the GPU page tables,
once we move to per-client address spaces, reducing the footprint of
memory that we need to allocate out of CMA.

3. It makes submit fencing look the same regardless of the core
configuration. There are configurations where a 2D and a 3D core are
sitting behind a shared frontend (Dove) and some where each engine has
it's own frontend (i.MX6). Having a single DRM driver allows us to make
both configurations look the same to userspace from a fencing
perspective.

There are probably some more arguments that have escaped the top of my
head right now. Regardless of how the DT bindings end up, we won't move
away from the single DRM device design.

So the question is: given the above, are you opposed to having a
virtual node in DT to describe this master device?
I already sketched up the alternative of having the master driver scan
the DT for matching GPU nodes at probe time and binding them together
into a single device. But given that we end up with one master device
anyways, do you really prefer this over the virtual node, which is a
working and proven solution to this exact problem?

Regards,
Lucas
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-12-05 11:26 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04 13:59 [PATCH 00/12] etnaviv DRM driver Lucas Stach
2015-12-04 13:59 ` [PATCH 03/12] drm/etnaviv: add etnaviv UAPI header Lucas Stach
     [not found]   ` <1449237604-19064-4-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-12-04 14:24     ` Emil Velikov
2015-12-04 13:59 ` [PATCH 04/12] drm/etnaviv: add generated hardware description headers Lucas Stach
2015-12-04 13:59 ` [PATCH 05/12] drm/etnaviv: add GPU core driver Lucas Stach
2015-12-04 14:00 ` [PATCH 08/12] drm/etnaviv: add GPU MMU handling functionality Lucas Stach
     [not found]   ` <1449237604-19064-9-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-12-04 14:59     ` Emil Velikov
     [not found]       ` <CACvgo50UW734S12xH=oszkNhgf53x5gbdeUxCdLZ0kGq1G=2Pg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-04 15:08         ` Lucas Stach
2015-12-04 14:00 ` [PATCH 10/12] drm/etnaviv: add master driver and hook up in Kconfig and Makefile Lucas Stach
     [not found] ` <1449237604-19064-1-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-12-04 13:59   ` [PATCH 01/12] devicetree: add vendor prefix for Vivante Corporation Lucas Stach
     [not found]     ` <1449237604-19064-2-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-12-04 16:23       ` Rob Herring
2015-12-04 13:59   ` [PATCH 02/12] drm/etnaviv: add devicetree bindings Lucas Stach
2015-12-04 16:29     ` Rob Herring
2015-12-04 16:41       ` Lucas Stach
2015-12-04 17:05         ` Russell King - ARM Linux
2015-12-04 17:33         ` Rob Herring
     [not found]           ` <CAL_JsqLcwk=h10zNvt1o=EKJZ58QvMyWnsTCNfkht-055X8Taw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-04 17:54             ` Russell King - ARM Linux
2015-12-04 17:56           ` Lucas Stach
     [not found]             ` <1449251760.8275.116.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-12-04 18:02               ` Jon Nettleton
2015-12-04 20:19             ` Rob Herring
2015-12-04 20:31               ` Russell King - ARM Linux
     [not found]                 ` <20151204203101.GD8644-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-12-04 20:42                   ` Ilia Mirkin
     [not found]                     ` <CAKb7UviPhoiY-YP2aBHm0BHbeEjSF2wTguQScVXMBve-kZc16Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-04 22:05                       ` Russell King - ARM Linux
2015-12-04 22:43                         ` Ilia Mirkin
2015-12-05 10:12                           ` Daniel Vetter
2015-12-05 11:02                             ` Russell King - ARM Linux
2015-12-05 15:35                               ` Daniel Vetter
2015-12-05 16:05                                 ` Russell King - ARM Linux
2015-12-07  8:41                             ` Michel Dänzer
2015-12-08  9:12                               ` Michel Dänzer
2015-12-08 13:15                           ` Rob Herring
2015-12-04 20:43                   ` Daniel Vetter
2015-12-05 11:26               ` Lucas Stach [this message]
     [not found]                 ` <1449314779.2702.17.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-12-05 11:42                   ` Russell King - ARM Linux
2015-12-05 23:22                     ` Rob Herring
2015-12-05 12:17                 ` Russell King - ARM Linux
2015-12-04 16:56       ` Russell King - ARM Linux
2015-12-04 13:59   ` [PATCH 06/12] drm/etnaviv: add GEM core functionality Lucas Stach
2015-12-04 13:59   ` [PATCH 07/12] drm/etnaviv: add GEM submit and cmdstream validation bits Lucas Stach
2015-12-04 14:00   ` [PATCH 09/12] drm/etnaviv: add GPU core dump functionality Lucas Stach
2015-12-04 14:00   ` [PATCH 11/12] MAINTAINERS: add Lucas Stach as maintainer for the etnaviv DRM driver Lucas Stach
2015-12-04 17:07     ` Russell King - ARM Linux
2015-12-04 17:08       ` Ilia Mirkin
     [not found]         ` <CAKb7Uvjh7B5ExWwRQNMhqDwTwPUsFKv4-jAszVp06qq2rGQFhg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-04 17:13           ` Russell King - ARM Linux
2015-12-04 17:17             ` Christian Gmeiner
     [not found]             ` <20151204171353.GA8644-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-12-04 17:18               ` Lucas Stach
     [not found]       ` <20151204170709.GY8644-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-12-04 17:26         ` Marc Kleine-Budde
2015-12-04 17:37           ` Russell King - ARM Linux
2015-12-05 15:17     ` Christian Gmeiner
2015-12-04 14:00   ` [PATCH 12/12] ARM: dts: imx6: add Vivante GPU nodes Lucas Stach
     [not found]     ` <1449237604-19064-13-git-send-email-l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-12-07 12:18       ` Russell King - ARM Linux
2015-12-11  7:02       ` Shawn Guo
2015-12-14  9:52         ` Lucas Stach
     [not found]           ` <1450086745.3163.3.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-12-15  8:25             ` Shawn Guo
2015-12-15 10:18               ` Lucas Stach
2015-12-04 19:05   ` [PATCH 13/12] ARM: dts: dove: add DT GPU support Russell King
2015-12-04 19:48   ` [PATCH v2 " Russell King
     [not found]     ` <E1a4wLa-0004Vi-2t-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2015-12-04 20:49       ` Andrew Lunn
     [not found]         ` <20151204204918.GB809-g2DYL2Zd6BY@public.gmane.org>
2015-12-04 22:07           ` Russell King - ARM Linux
2015-12-04 19:48   ` [PATCH v2 14/12] ARM: dts: enable GPU for SolidRun's Cubox Russell King

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=1449314779.2702.17.camel@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel@pengutronix.de \
    --cc=patchwork-lst@pengutronix.de \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).