[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <zvwxrnd64a2ho3wc2zyzriwrk5uvmhfluqqph6jne7vrelzlxi@uynwtcc4huny>
Date: Fri, 31 Oct 2025 14:15:24 +0200
From: Laurentiu Palcu <laurentiu.palcu@....nxp.com>
To: Luca Ceresoli <luca.ceresoli@...tlin.com>
Cc: imx@...ts.linux.dev, Andrzej Hajda <andrzej.hajda@...el.com>,
Neil Armstrong <neil.armstrong@...aro.org>, Robert Foss <rfoss@...nel.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>, Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...il.com>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/9] drm/bridge: fsl-ldb: Add support for i.MX94
Hi Luca,
On Fri, Oct 31, 2025 at 09:27:29AM +0100, Luca Ceresoli wrote:
> Hello Laurentiu,
>
> On Thu Sep 11, 2025 at 1:37 PM CEST, Laurentiu Palcu wrote:
> > i.MX94 series LDB controller shares the same LDB and LVDS control
> > registers as i.MX8MP and i.MX93 but supports a higher maximum clock
> > frequency.
> >
> > Add a 'max_clk_khz' member to the fsl_ldb_devdata structure in order to
> > be able to set different max frequencies for other platforms.
> >
> > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@....nxp.com>
> > Reviewed-by: Frank Li <Frank.Li@....com>
>
> [...]
>
> > @@ -270,8 +281,9 @@ fsl_ldb_mode_valid(struct drm_bridge *bridge,
> > const struct drm_display_mode *mode)
>
> I'd suggest a couple possible code style improvements here:
>
> > {
> > struct fsl_ldb *fsl_ldb = to_fsl_ldb(bridge);
> > + u32 ch_max_clk_khz = fsl_ldb->devdata->max_clk_khz;
>
> You don't need a variable to use it only once.
>
> >
> > - if (mode->clock > (fsl_ldb_is_dual(fsl_ldb) ? 160000 : 80000))
> > + if (mode->clock > (fsl_ldb_is_dual(fsl_ldb) ? 2 * ch_max_clk_khz : ch_max_clk_khz))
>
> And here you can use the ternary operator to compute the multiplier only:
>
> if (mode->clock > (fsl_ldb_is_dual(fsl_ldb) ? 2 : 1) * fsl_ldb->devdata->max_clk_khz)
>
> Up to you whether you want to take my proposals above.
I'm ok with your proposal. I will include it in v6.
Thanks,
Laurentiu
> The patch looks good anyway, so with or without those changes:
>
> Reviewed-by: Luca Ceresoli <luca.ceresoli@...tlin.com>
>
> --
> Luca Ceresoli, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
--
Thanks,
Laurentiu
Powered by blists - more mailing lists