All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Laurentiu Palcu" <laurentiu.palcu@oss.nxp.com>
Cc: Frank.Li@kernel.org, imx@lists.linux.dev, robh@kernel.org,
	conor+dt@kernel.org, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v9 3/9] drm/bridge: fsl-ldb: Add support for i.MX94
Date: Fri, 12 Jun 2026 12:09:00 +0000	[thread overview]
Message-ID: <20260612120900.AEE211F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260612-dcif-upstreaming-v9-3-8d0ff89aa3c5@oss.nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Pre-existing use of usleep_range() in an atomic commit callback (fsl_ldb_atomic_enable).
--

commit e14b3dd6d0171a77b5885d6c520dacd31270636e
Author: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>

drm/bridge: fsl-ldb: Add support for i.MX94

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.

> diff --git a/drivers/gpu/drm/bridge/fsl-ldb.c b/drivers/gpu/drm/bridge/fsl-ldb.c
> index bd03c36ee696c..b4959f654f2ac 100644
> --- a/drivers/gpu/drm/bridge/fsl-ldb.c
> +++ b/drivers/gpu/drm/bridge/fsl-ldb.c

[ ... ]

[Severity: High]
This isn't a bug introduced by this patch, but I noticed a pre-existing
issue in fsl_ldb_atomic_enable() which executes as part of the atomic commit
modeset phase:

drivers/gpu/drm/bridge/fsl-ldb.c:fsl_ldb_atomic_enable() {
    ...
	if (fsl_ldb->use_termination_resistor)
		reg |= LVDS_CTRL_HS_EN;
	regmap_write(fsl_ldb->regmap, fsl_ldb->devdata->lvds_ctrl, reg);

	/* Wait for VBG to stabilize. */
	usleep_range(15, 20);

	reg |=	(fsl_ldb->ch0_enabled ? LVDS_CTRL_CH0_EN : 0) |
		(fsl_ldb->ch1_enabled ? LVDS_CTRL_CH1_EN : 0);
    ...
}

Are sleeping functions permitted in this context?

Because fsl_ldb_atomic_enable() acts as an encoder atomic enable callback,
it runs in an atomic context where sleeping delays like usleep_range()
are forbidden.

Could this lead to kernel warnings, system instability, or deadlocks?

Should this be replaced with a non-sleeping delay like udelay()?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260612-dcif-upstreaming-v9-0-8d0ff89aa3c5@oss.nxp.com?part=3

  reply	other threads:[~2026-06-12 12:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 11:58 [PATCH v9 0/9] Add support for i.MX94 DCIF Laurentiu Palcu
2026-06-12 11:58 ` [PATCH v9 1/9] dt-bindings: display: fsl,ldb: Add i.MX94 LDB Laurentiu Palcu
2026-06-12 11:58 ` [PATCH v9 2/9] drm/bridge: fsl-ldb: Get the next non-panel bridge Laurentiu Palcu
2026-06-15 15:02   ` Frank Li
2026-06-12 11:58 ` [PATCH v9 3/9] drm/bridge: fsl-ldb: Add support for i.MX94 Laurentiu Palcu
2026-06-12 12:09   ` sashiko-bot [this message]
2026-06-15 15:00   ` Frank Li
2026-06-12 11:58 ` [PATCH v9 4/9] dt-bindings: display: imx: Add i.MX94 DCIF Laurentiu Palcu
2026-06-15 15:01   ` Frank Li
2026-06-15 21:04   ` Rob Herring (Arm)
2026-06-12 11:58 ` [PATCH v9 5/9] drm/imx: Add support for " Laurentiu Palcu
2026-06-12 12:18   ` sashiko-bot
2026-06-15 14:58   ` Frank Li
2026-06-12 11:58 ` [PATCH v9 6/9] dt-bindings: clock: nxp, imx95-blk-ctl: Add ldb child node Laurentiu Palcu
2026-06-12 11:58   ` [PATCH v9 6/9] dt-bindings: clock: nxp,imx95-blk-ctl: " Laurentiu Palcu
2026-06-12 12:10   ` sashiko-bot
2026-06-12 11:58 ` [PATCH v9 7/9] arm64: dts: imx94: Add display pipeline nodes Laurentiu Palcu
2026-06-12 11:58 ` [PATCH v9 8/9] arm64: dts: imx943-evk: Add display support using IT6263 Laurentiu Palcu
2026-06-12 11:58 ` [PATCH v9 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=20260612120900.AEE211F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imx@lists.linux.dev \
    --cc=laurentiu.palcu@oss.nxp.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.