U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Raphaël Gallais-Pou" <rgallaispou@gmail.com>
To: Simon Glass <sjg@chromium.org>
Cc: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>,
	Tom Rini <trini@konsulko.com>,
	Yannick Fertre <yannick.fertre@foss.st.com>,
	u-boot@lists.denx.de, uboot-stm32@st-md-mailman.stormreply.com,
	Sumit Garg <sumit.garg@kernel.org>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Kamil Lulko <kamil.lulko@gmail.com>,
	Dillon Min <dillon.minfei@gmail.com>,
	Anatolij Gustschin <ag.dev.uboot@gmail.com>
Subject: Re: [Uboot-stm32] [PATCH v3 1/7] ofnode: support panel-timings in ofnode_decode_display_timing
Date: Sun, 2 Nov 2025 02:09:50 +0100	[thread overview]
Message-ID: <aQavXq6jVagkIa53@thinkstation> (raw)
In-Reply-To: <CAFLszTiT9iLx6gguhVui2Qh0Ew89yhvpDggKwPo71cB+Rv=xJA@mail.gmail.com>

Le Sat, Nov 01, 2025 at 10:03:59AM +0100, Simon Glass a écrit :
> Hi Raphael,
> 
> On Thu, 4 Sept 2025 at 14:53, Raphael Gallais-Pou
> <raphael.gallais-pou@foss.st.com> wrote:
> >
> > The "Display Timings" in panel-common.yaml can be provided by 2 properties
> > - panel-timing: when display panels are restricted to a single resolution
> >                 the "panel-timing" node expresses the required timings.
> > - display-timings: several resolutions with different timings are supported
> >                    with several timing subnode of "display-timings" node
> >
> > This patch update the parsing function to handle this 2 possibility
> > when index = 0.
> >
> > Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
> > Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
> > Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
> > ---
> >  drivers/core/ofnode.c | 17 ++++++++++-------
> >  1 file changed, 10 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
> > index e040e3f2806ffe74c58dcd82f36307351acd5a99..5a721b46e5a3214e7bd437739776362c2d22a3c9 100644
> > --- a/drivers/core/ofnode.c
> > +++ b/drivers/core/ofnode.c
> > @@ -1221,13 +1221,16 @@ int ofnode_decode_display_timing(ofnode parent, int index,
> >         int ret = 0;
> >
> >         timings = ofnode_find_subnode(parent, "display-timings");
> > -       if (!ofnode_valid(timings))
> > -               return -EINVAL;
> > -
> > -       i = 0;
> > -       ofnode_for_each_subnode(node, timings) {
> > -               if (i++ == index)
> > -                       break;
> > +       if (ofnode_valid(timings)) {
> > +               i = 0;
> > +               ofnode_for_each_subnode(node, timings) {
> > +                       if (i++ == index)
> > +                               break;
> > +               }
> > +       } else {
> > +               if (index != 0)
> > +                       return -EINVAL;
> > +               node = ofnode_find_subnode(parent, "panel-timing");
> >         }
> >
> >         if (!ofnode_valid(node))
> >
> > --
> > 2.25.1
> >
> 
> Please add a test for this in test/dm/ofnode.c

Hi Simon,

I'll gladly do that, but I haven't write and use any test in U-Boot.  So
it is a bit foggy how to implement it.

Do we want to create a fake device-tree and test each configuration or
do we want to test in the _current_ device-tree if timings are correctly
set according to the index value ?

Best regards,
Raphaël

> 
> Regards,
> Simon
> _______________________________________________
> Uboot-stm32 mailing list
> Uboot-stm32@st-md-mailman.stormreply.com
> https://st-md-mailman.stormreply.com/mailman/listinfo/uboot-stm32

  reply	other threads:[~2025-11-02 17:18 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04 12:53 [PATCH v3 0/7] Add display support for STM32MP25 Raphael Gallais-Pou
2025-09-04 12:53 ` [PATCH v3 1/7] ofnode: support panel-timings in ofnode_decode_display_timing Raphael Gallais-Pou
2025-10-30  7:35   ` Yannick FERTRE
2025-11-01  9:03   ` Simon Glass
2025-11-02  1:09     ` Raphaël Gallais-Pou [this message]
2025-11-02 19:53       ` [Uboot-stm32] " Simon Glass
2025-11-03 14:17         ` Tom Rini
2025-11-04 14:01           ` Raphael Gallais-Pou
2025-11-04 16:21             ` Tom Rini
2025-11-14 16:48               ` Patrice CHOTARD
2025-11-04 16:31           ` Simon Glass
2025-11-04 16:55             ` Tom Rini
2025-11-07 12:23               ` Simon Glass
2025-09-04 12:53 ` [PATCH v3 2/7] video: simple_panel: add support for "panel-lvds" display Raphael Gallais-Pou
2025-10-30  7:41   ` Yannick FERTRE
2025-11-14 16:48   ` Patrice CHOTARD
2025-09-04 12:53 ` [PATCH v3 3/7] video: stm32: STM32 driver support for LVDS Raphael Gallais-Pou
2025-10-30  7:42   ` Yannick FERTRE
2025-11-14 16:48     ` Patrice CHOTARD
2025-09-04 12:53 ` [PATCH v3 4/7] video: stm32: ltdc: support new hardware version for STM32MP25 SoC Raphael Gallais-Pou
2025-09-12 16:41   ` Patrice CHOTARD
2025-09-15 13:05     ` Raphael Gallais-Pou
2025-09-17 15:10       ` Patrice CHOTARD
2025-10-30  7:43   ` Yannick FERTRE
2025-11-14 16:49     ` Patrice CHOTARD
2025-09-04 12:53 ` [PATCH v3 5/7] video: stm32: ltdc: properly search the first available panel Raphael Gallais-Pou
2025-09-12 16:45   ` Patrice CHOTARD
2025-10-30  7:43   ` Yannick FERTRE
2025-11-14 16:49     ` Patrice CHOTARD
2025-09-04 12:53 ` [PATCH v3 6/7] ARM: dts: stm32: use LTDC and LVDS nodes before relocation in stm32mp25-u-boot Raphael Gallais-Pou
2025-09-12 16:45   ` Patrice CHOTARD
2025-10-30  7:43   ` Yannick FERTRE
2025-11-14 16:49     ` Patrice CHOTARD
2025-11-14 16:54       ` Patrice CHOTARD
2025-11-14 17:30         ` [Uboot-stm32] " Patrice CHOTARD
2025-09-04 12:53 ` [PATCH v3 7/7] configs: stm32mp25: enable LVDS display support Raphael Gallais-Pou
2025-09-12 16:46   ` Patrice CHOTARD
2025-10-30  7:44   ` Yannick FERTRE
2025-11-14 16:48   ` Patrice CHOTARD

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=aQavXq6jVagkIa53@thinkstation \
    --to=rgallaispou@gmail.com \
    --cc=ag.dev.uboot@gmail.com \
    --cc=dillon.minfei@gmail.com \
    --cc=kamil.lulko@gmail.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=raphael.gallais-pou@foss.st.com \
    --cc=sjg@chromium.org \
    --cc=sumit.garg@kernel.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    --cc=yannick.fertre@foss.st.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