All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>, Rob Herring <robh@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>
Subject: Re: [PATCH v3 03/12] drm: rcar-du: Fix legacy DT to create LVDS encoder nodes
Date: Thu, 15 Feb 2018 13:03:22 +0200	[thread overview]
Message-ID: <3075173.XelUTNRH3C@avalon> (raw)
In-Reply-To: <CAMuHMdVdCrUVDCmEvyOwhGxZ-VG+u4G+C2_rZMR1cN8-v5s2ew@mail.gmail.com>

Hi Geert,

On Thursday, 15 February 2018 11:18:25 EET Geert Uytterhoeven wrote:
> On Thu, Feb 15, 2018 at 1:04 AM, Laurent Pinchart wrote:
> > The internal LVDS encoders now have their own DT bindings. Before
> > switching the driver infrastructure to those new bindings, implement
> > backward-compatibility through live DT patching.
> > 
> > Patching is disabled and will be enabled along with support for the new
> > DT bindings in the DU driver.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> 
> Thanks for your patch!
> 
> > --- /dev/null
> > +++ b/drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dts
> > @@ -0,0 +1,81 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * rcar_du_of_lvds_r8a7790.dts - Legacy LVDS DT bindings conversion for
> > R8A7790 + *
> > + * Copyright (C) 2018 Laurent Pinchart
> > <laurent.pinchart@ideasonboard.com>
> > + *
> > + * Based on work from Jyri Sarha <jsarha@ti.com>
> > + * Copyright (C) 2015 Texas Instruments
> > + */
> > +
> > +#include <dt-bindings/clock/renesas-cpg-mssr.h>
> > +
> > +/dts-v1/;
> > +/plugin/;
> > +/ {
> > +       fragment@0 {
> > +               target-path = "/";
> > +               __overlay__ {
> > +                       #address-cells = <2>;
> > +                       #size-cells = <2>;
> > +
> > +                       lvds@feb90000 {
> > +                               compatible = "renesas,r8a7790-lvds";
> > +                               reg = <0 0xfeb90000 0 0x1c>;
> > +
> > +                               ports {
> > +                                       #address-cells = <1>;
> > +                                       #size-cells = <0>;
> > +
> > +                                       port@0 {
> > +                                               reg = <0>;
> > +                                               lvds0_input: endpoint {
> > +                                               };
> > +                                       };
> > +                                       port@1 {
> > +                                               reg = <1>;
> > +                                               lvds0_out: endpoint {
> > +                                               };
> > +                                       };
> > +                               };
> > +                       };
> > +
> > +                       lvds@feb94000 {
> > +                               compatible = "renesas,r8a7790-lvds";
> > +                               reg = <0 0xfeb94000 0 0x1c>;
> > +
> > +                               ports {
> > +                                       #address-cells = <1>;
> > +                                       #size-cells = <0>;
> > +
> > +                                       port@0 {
> > +                                               reg = <0>;
> > +                                               lvds1_input: endpoint {
> > +                                               };
> > +                                       };
> > +                                       port@1 {
> > +                                               reg = <1>;
> > +                                               lvds1_out: endpoint {
> > +                                               };
> > +                                       };
> > +                               };
> > +                       };
> > +               };
> > +       };
> > +
> > +       fragment@1 {
> > +               target-path = "/display@feb00000/ports";
> 
> Does this work now there can be an "soc" subnode, too?
> 
> Your code obtains the right parent:
> 
>     soc_node = of_get_parent(du_node);
> 
> but the overlay is applied without considering that, if I'm not mistaken.

Correct, and as I can't modify the target-path in the overlay dynamically 
anymore, I can't take this into account. I could duplicate the r8a7790 and 
r8a7791 overlays in two versions to handle this, but as the soc subnode isn't 
in mainline yet, I'd rather get this patch series merged with the current 
implementation in v4.17 to not have to handle this issue :-)

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2018-02-15 11:02 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15  0:04 [PATCH v3 00/12] R-Car DU: Convert LVDS code to bridge driver Laurent Pinchart
2018-02-15  0:04 ` Laurent Pinchart
2018-02-15  0:04 ` [PATCH v3 01/12] dt-bindings: display: renesas: Add R-Car LVDS encoder DT bindings Laurent Pinchart
2018-02-15  0:04   ` Laurent Pinchart
2018-02-15  0:04 ` [PATCH v3 02/12] dt-bindings: display: renesas: Deprecate LVDS support in the DU bindings Laurent Pinchart
2018-02-15  0:04   ` Laurent Pinchart
2018-02-15  0:04 ` [PATCH v3 03/12] drm: rcar-du: Fix legacy DT to create LVDS encoder nodes Laurent Pinchart
2018-02-15  9:18   ` Geert Uytterhoeven
2018-02-15  9:18     ` Geert Uytterhoeven
2018-02-15 11:03     ` Laurent Pinchart [this message]
2018-02-15 11:32       ` Geert Uytterhoeven
2018-02-20  0:54   ` Rob Herring
2018-02-20  0:54     ` Rob Herring
2018-02-20  9:15     ` Laurent Pinchart
2018-02-20  9:15       ` Laurent Pinchart
2018-02-20 14:04       ` Rob Herring
2018-02-20 14:04         ` Rob Herring
2018-02-15  0:04 ` [PATCH v3 04/12] drm: rcar-du: Convert LVDS encoder code to bridge driver Laurent Pinchart
2018-02-15  0:04   ` Laurent Pinchart
2018-02-15  0:04 ` [PATCH v3 05/12] ARM: dts: porter: Fix HDMI output routing Laurent Pinchart
2018-02-15 18:18   ` Simon Horman
2018-02-15  0:04 ` [PATCH v3 06/12] ARM: dts: r8a7790: Convert to new LVDS DT bindings Laurent Pinchart
2018-02-15  9:20   ` Geert Uytterhoeven
2018-02-15  9:20     ` Geert Uytterhoeven
2018-02-15 11:30     ` Laurent Pinchart
2018-02-15 18:20   ` Simon Horman
2018-02-15  0:04 ` [PATCH v3 07/12] ARM: dts: r8a7791: " Laurent Pinchart
2018-02-15  0:04 ` [PATCH v3 08/12] ARM: dts: r8a7792: Convert to new DU " Laurent Pinchart
2018-02-15  0:04   ` Laurent Pinchart
2018-02-15  0:04 ` [PATCH v3 09/12] ARM: dts: r8a7793: Convert to new LVDS " Laurent Pinchart
2018-02-15  0:04   ` Laurent Pinchart
2018-02-15  0:04 ` [PATCH v3 10/12] ARM: dts: r8a7794: Convert to new DU " Laurent Pinchart
2018-02-15  0:04 ` [PATCH v3 11/12] arm64: dts: renesas: r8a7795: Convert to new LVDS " Laurent Pinchart
2018-02-15  0:04   ` Laurent Pinchart
2018-02-15  0:04 ` [PATCH v3 12/12] arm64: dts: renesas: r8a7796: " Laurent Pinchart

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=3075173.XelUTNRH3C@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frowand.list@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sergei.shtylyov@cogentembedded.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.