From: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> To: Laurent Pinchart <laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> Cc: DRI Development <dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>, Linux-Renesas <linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, Sergei Shtylyov <sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Subject: Re: [PATCH 03/10] drm: rcar-du: Fix legacy DT to create LVDS encoder nodes Date: Fri, 12 Jan 2018 11:09:45 +0100 [thread overview] Message-ID: <CAMuHMdW5wDj5gyTnh+Xa3J10b_6For0MdhcTFgdU_+sgx=BYmA@mail.gmail.com> (raw) In-Reply-To: <20180112005858.26472-4-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> Hi Laurent, On Fri, Jan 12, 2018 at 1:58 AM, Laurent Pinchart <laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> 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-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> Thanks for your patch! > --- a/drivers/gpu/drm/rcar-du/Kconfig > +++ b/drivers/gpu/drm/rcar-du/Kconfig > @@ -22,6 +22,7 @@ config DRM_RCAR_LVDS > bool "R-Car DU LVDS Encoder Support" > depends on DRM_RCAR_DU > select DRM_PANEL > + select OF_OVERLAY select OF_FLATTREE for of_fdt_unflatten_tree() (you can probably check with sparc all*config) > --- /dev/null > +++ b/drivers/gpu/drm/rcar-du/rcar_du_of.c > @@ -0,0 +1,440 @@ > +// SPDX-License-Identifier: GPL-2.0-only -ENOENT in Documentation/process/license-rules.rst ;-) > +extern u8 __dtb_rcar_du_of_lvds_begin[]; > +extern u8 __dtb_rcar_du_of_lvds_end[]; Typically sections are declared using char, not u8. > +static int __init rcar_du_of_get_overlay(struct rcar_du_of_overlay *overlay, > + u8 *begin, u8 *end) "void *begin, void *end" sounds more natural to me. > +static void __init rcar_du_of_lvds_patch_one(struct device_node *du, > + unsigned int port_id, > + const struct resource *res, > + const __be32 *reg, > + const struct of_phandle_args *clkspec, > + struct device_node *local, > + struct device_node *remote) > +{ > + > + /* Skip if the LVDS node already exists. */ > + sprintf(name, "lvds@%llx", (u64)res->start); I guess you cannot use %pa because you don't want a 0x prefix? > + /* > + * Patch the LVDS and DU port nodes names and the associated fixup > + * entries. > + */ > + lvds = rcar_du_of_find_node_by_path(overlay.np, > + "/fragment@0/__overlay__/lvds"); > + lvds_endpoints[0] = rcar_du_of_find_node_by_path(overlay.np, > + "/fragment@0/__overlay__/lvds/ports/port@0/endpoint"); > + lvds_endpoints[1] = rcar_du_of_find_node_by_path(overlay.np, > + "/fragment@0/__overlay__/lvds/ports/port@1/endpoint"); > + du_port = rcar_du_of_find_node_by_path(overlay.np, > + "/fragment@1/__overlay__/ports/port@0"); > + du_port_fixup = rcar_du_of_find_node_by_path(overlay.np, > + "/__local_fixups__/fragment@1/__overlay__/ports/port@0"); Many strings with similar prefixes or substrings? Would it make sense to e.g. locate "/fragment@0/__overlay__/lvds/ports" first, and continue from there? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org> To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Cc: DRI Development <dri-devel@lists.freedesktop.org>, Linux-Renesas <linux-renesas-soc@vger.kernel.org>, Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>, devicetree@vger.kernel.org Subject: Re: [PATCH 03/10] drm: rcar-du: Fix legacy DT to create LVDS encoder nodes Date: Fri, 12 Jan 2018 11:09:45 +0100 [thread overview] Message-ID: <CAMuHMdW5wDj5gyTnh+Xa3J10b_6For0MdhcTFgdU_+sgx=BYmA@mail.gmail.com> (raw) In-Reply-To: <20180112005858.26472-4-laurent.pinchart+renesas@ideasonboard.com> Hi Laurent, On Fri, Jan 12, 2018 at 1:58 AM, Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> 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! > --- a/drivers/gpu/drm/rcar-du/Kconfig > +++ b/drivers/gpu/drm/rcar-du/Kconfig > @@ -22,6 +22,7 @@ config DRM_RCAR_LVDS > bool "R-Car DU LVDS Encoder Support" > depends on DRM_RCAR_DU > select DRM_PANEL > + select OF_OVERLAY select OF_FLATTREE for of_fdt_unflatten_tree() (you can probably check with sparc all*config) > --- /dev/null > +++ b/drivers/gpu/drm/rcar-du/rcar_du_of.c > @@ -0,0 +1,440 @@ > +// SPDX-License-Identifier: GPL-2.0-only -ENOENT in Documentation/process/license-rules.rst ;-) > +extern u8 __dtb_rcar_du_of_lvds_begin[]; > +extern u8 __dtb_rcar_du_of_lvds_end[]; Typically sections are declared using char, not u8. > +static int __init rcar_du_of_get_overlay(struct rcar_du_of_overlay *overlay, > + u8 *begin, u8 *end) "void *begin, void *end" sounds more natural to me. > +static void __init rcar_du_of_lvds_patch_one(struct device_node *du, > + unsigned int port_id, > + const struct resource *res, > + const __be32 *reg, > + const struct of_phandle_args *clkspec, > + struct device_node *local, > + struct device_node *remote) > +{ > + > + /* Skip if the LVDS node already exists. */ > + sprintf(name, "lvds@%llx", (u64)res->start); I guess you cannot use %pa because you don't want a 0x prefix? > + /* > + * Patch the LVDS and DU port nodes names and the associated fixup > + * entries. > + */ > + lvds = rcar_du_of_find_node_by_path(overlay.np, > + "/fragment@0/__overlay__/lvds"); > + lvds_endpoints[0] = rcar_du_of_find_node_by_path(overlay.np, > + "/fragment@0/__overlay__/lvds/ports/port@0/endpoint"); > + lvds_endpoints[1] = rcar_du_of_find_node_by_path(overlay.np, > + "/fragment@0/__overlay__/lvds/ports/port@1/endpoint"); > + du_port = rcar_du_of_find_node_by_path(overlay.np, > + "/fragment@1/__overlay__/ports/port@0"); > + du_port_fixup = rcar_du_of_find_node_by_path(overlay.np, > + "/__local_fixups__/fragment@1/__overlay__/ports/port@0"); Many strings with similar prefixes or substrings? Would it make sense to e.g. locate "/fragment@0/__overlay__/lvds/ports" first, and continue from there? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
next prev parent reply other threads:[~2018-01-12 10:09 UTC|newest] Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-01-12 0:58 [PATCH 00/10] R-Car DU: Convert LVDS code to bridge driver Laurent Pinchart 2018-01-12 0:58 ` [PATCH 01/10] dt-bindings: display: renesas: Add R-Car LVDS encoder DT bindings Laurent Pinchart 2018-01-12 0:58 ` Laurent Pinchart 2018-01-12 9:45 ` Geert Uytterhoeven [not found] ` <CAMuHMdWMgst-1evod+0hZujU2xPtO3UmO9c2CPPrTg=gpHpTbw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2018-01-12 13:36 ` Laurent Pinchart 2018-01-12 13:36 ` Laurent Pinchart 2018-01-12 10:13 ` Geert Uytterhoeven 2018-01-12 13:29 ` Laurent Pinchart 2018-01-15 6:55 ` Simon Horman 2018-01-15 6:55 ` Simon Horman [not found] ` <20180115065528.cfelrll6dm6ggf4e-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> 2018-01-15 6:59 ` Laurent Pinchart 2018-01-15 6:59 ` Laurent Pinchart 2018-01-15 7:57 ` Simon Horman 2018-01-15 8:05 ` Geert Uytterhoeven 2018-01-15 8:26 ` Laurent Pinchart [not found] ` <20180112005858.26472-2-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> 2018-01-12 12:59 ` Biju Das 2018-01-12 12:59 ` Biju Das 2018-01-12 13:26 ` Laurent Pinchart 2018-01-12 14:00 ` Fabrizio Castro 2018-01-12 14:25 ` Laurent Pinchart 2018-01-12 14:25 ` Laurent Pinchart 2018-01-12 15:13 ` Sergei Shtylyov [not found] ` <81a9462b-6aaa-52c7-f741-e504c14838e9-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org> 2018-01-12 20:34 ` Laurent Pinchart 2018-01-12 20:34 ` Laurent Pinchart 2018-01-12 0:58 ` [PATCH 02/10] dt-bindings: display: renesas: Deprecate LVDS support in the DU bindings Laurent Pinchart 2018-01-12 9:49 ` Geert Uytterhoeven [not found] ` <CAMuHMdXYJmh8ssSRt8u75fTv5gyrpcoPKAuCT=BaF1Eu27CaiQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2018-01-12 10:44 ` Laurent Pinchart 2018-01-12 10:44 ` Laurent Pinchart 2018-01-19 21:23 ` Rob Herring 2018-01-19 21:23 ` Rob Herring [not found] ` <20180112005858.26472-3-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> 2018-01-12 9:54 ` Vladimir Zapolskiy 2018-01-12 9:54 ` Vladimir Zapolskiy 2018-01-12 10:43 ` Laurent Pinchart 2018-01-12 14:52 ` Sergei Shtylyov 2018-01-12 14:52 ` Sergei Shtylyov 2018-01-12 15:14 ` Sergei Shtylyov 2018-01-12 15:14 ` Sergei Shtylyov 2018-01-12 16:46 ` Laurent Pinchart 2018-01-19 21:24 ` Rob Herring 2018-01-12 0:58 ` [PATCH 03/10] drm: rcar-du: Fix legacy DT to create LVDS encoder nodes Laurent Pinchart [not found] ` <20180112005858.26472-4-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> 2018-01-12 10:09 ` Geert Uytterhoeven [this message] 2018-01-12 10:09 ` Geert Uytterhoeven [not found] ` <CAMuHMdW5wDj5gyTnh+Xa3J10b_6For0MdhcTFgdU_+sgx=BYmA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2018-01-12 13:53 ` Laurent Pinchart 2018-01-12 13:53 ` Laurent Pinchart 2018-01-12 0:58 ` [PATCH 04/10] drm: rcar-du: Convert LVDS encoder code to bridge driver Laurent Pinchart 2018-01-12 0:58 ` [PATCH 05/10] ARM: dts: porter: Fix HDMI output routing Laurent Pinchart 2018-01-15 7:56 ` Simon Horman 2018-01-15 8:25 ` Laurent Pinchart 2018-01-16 9:09 ` Simon Horman 2018-01-12 0:58 ` [PATCH 06/10] ARM: dts: r8a7790: Convert to new LVDS DT bindings Laurent Pinchart 2018-01-12 0:58 ` Laurent Pinchart 2018-01-12 0:58 ` [PATCH 07/10] ARM: dts: r8a7791: " Laurent Pinchart 2018-01-12 0:58 ` [PATCH 08/10] ARM: dts: r8a7793: " Laurent Pinchart 2018-01-12 0:58 ` [PATCH 09/10] arm64: dts: renesas: r8a7795: " Laurent Pinchart 2018-01-12 0:58 ` [PATCH 10/10] arm64: dts: renesas: r8a7796: " Laurent Pinchart 2018-01-12 9:47 ` [PATCH 00/10] R-Car DU: Convert LVDS code to bridge driver Geert Uytterhoeven 2018-01-12 13:48 ` Laurent Pinchart 2018-01-15 6:57 ` Simon Horman 2018-01-15 6:57 ` Simon Horman 2018-01-15 7:00 ` Laurent Pinchart 2018-01-15 7:58 ` Simon Horman [not found] ` <20180112005858.26472-1-laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> 2018-01-15 6:59 ` Simon Horman 2018-01-15 6:59 ` Simon Horman
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='CAMuHMdW5wDj5gyTnh+Xa3J10b_6For0MdhcTFgdU_+sgx=BYmA@mail.gmail.com' \ --to=geert-td1emuhucqxl1znqvxdv9g@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \ --cc=laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \ --cc=linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.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: linkBe 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.