From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Laurentiu Palcu" <laurentiu.palcu@oss.nxp.com>,
<imx@lists.linux.dev>, "Andrzej Hajda" <andrzej.hajda@intel.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Robert Foss" <rfoss@kernel.org>,
"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>
Cc: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 3/9] drm/bridge: fsl-ldb: Add support for i.MX94
Date: Fri, 31 Oct 2025 09:27:29 +0100 [thread overview]
Message-ID: <DDWD5P3SKWMV.1LITMN6MAKGMA@bootlin.com> (raw)
In-Reply-To: <20250911-dcif-upstreaming-v5-3-a1e8dab8ae40@oss.nxp.com>
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@oss.nxp.com>
> Reviewed-by: Frank Li <Frank.Li@nxp.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. The patch looks good
anyway, so with or without those changes:
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2025-10-31 8:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 11:37 [PATCH v5 0/9] Add support for i.MX94 DCIF Laurentiu Palcu
2025-09-11 11:37 ` [PATCH v5 1/9] dt-bindings: display: fsl,ldb: Add i.MX94 LDB Laurentiu Palcu
2025-09-11 11:37 ` [PATCH v5 2/9] drm/bridge: fsl-ldb: Get the next non-panel bridge Laurentiu Palcu
2025-10-29 12:58 ` Francesco Valla
2025-09-11 11:37 ` [PATCH v5 3/9] drm/bridge: fsl-ldb: Add support for i.MX94 Laurentiu Palcu
2025-10-31 8:27 ` Luca Ceresoli [this message]
2025-10-31 12:15 ` Laurentiu Palcu
2025-09-11 11:37 ` [PATCH v5 4/9] dt-bindings: display: imx: Add i.MX94 DCIF Laurentiu Palcu
2025-09-11 15:26 ` Frank Li
2025-09-12 7:09 ` Krzysztof Kozlowski
2025-09-11 11:37 ` [PATCH v5 5/9] drm/imx: Add support for " Laurentiu Palcu
2025-10-31 8:14 ` Luca Ceresoli
2025-10-31 12:15 ` Laurentiu Palcu
2025-09-11 11:37 ` [PATCH v5 6/9] dt-bindings: clock: nxp,imx95-blk-ctl: Add ldb child node Laurentiu Palcu
2025-09-12 7:10 ` Krzysztof Kozlowski
2025-09-11 11:37 ` [PATCH v5 7/9] arm64: dts: imx943: Add display pipeline nodes Laurentiu Palcu
2025-09-11 11:37 ` [PATCH v5 8/9] arm64: dts: imx943-evk: Add display support using IT6263 Laurentiu Palcu
2025-09-11 11:37 ` [PATCH v5 9/9] MAINTAINERS: Add entry for i.MX94 DCIF driver Laurentiu Palcu
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=DDWD5P3SKWMV.1LITMN6MAKGMA@bootlin.com \
--to=luca.ceresoli@bootlin.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=imx@lists.linux.dev \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=laurentiu.palcu@oss.nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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