From: sashiko-bot@kernel.org
To: "Daniel Golle" <daniel@makrotopia.org>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v6 04/13] drm/bridge: it6505: complete poweroff even if disabling regulators fails
Date: Sat, 25 Jul 2026 03:17:59 +0000 [thread overview]
Message-ID: <20260725031800.62D9A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <a5b76e4b0c348dc19595d918a14867b785e8af07.1784947240.git.daniel@makrotopia.org>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [Low] Missing newline (`\n`) in the newly added `dev_err` format strings.
Pre-existing issues:
- [High] The interrupt handler does not check the return value of `it6505_read()` for error codes, causing spurious interrupt triggers.
- [High] The power-off sequence disables the IVDD (`pwr18`) regulator before the OVDD (`ovdd`) regulator, violating the reverse-order power-down requirement.
--
--- Patch [4]: [PATCH v6 04/13] drm/bridge: it6505: complete poweroff even if disabling regulators fails ---
commit 1009be5a50c31876cc2fed6f2166f7843b4776a3
Author: Daniel Golle <daniel@makrotopia.org>
drm/bridge: it6505: complete poweroff even if disabling regulators fails
it6505_poweroff() returns early when regulator_disable() fails,
leaving it6505->powered set with the IRQ already disabled. The next
it6505_poweron() then takes its early return and never re-enables the
IRQ, leaving the bridge deaf to hotplug and link training interrupts.
The regulator core keeps the consumer's enable count on a failed
disable either way, so bailing out only adds a wedged bridge on top of
the leaked reference. Log the error and complete the power-off state
transition instead.
> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
> index c10cc6a786b5d..fb6030a2c18cb 100644
> --- a/drivers/gpu/drm/bridge/ite-it6505.c
> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> @@ -2811,13 +2811,15 @@ static int it6505_poweroff(struct it6505 *it6505)
> if (pdata->pwr18) {
> err = regulator_disable(pdata->pwr18);
[Severity: High]
This isn't a bug introduced by this patch, but does this power-off sequence
violate the reverse-order power-down requirement?
The it6505_poweron() function explicitly enforces pwr18 -> ovdd ordering,
but this disables the core voltage (IVDD/pwr18) before the IO voltage
(OVDD/ovdd).
Could this forward order create reverse current paths through ESD diodes,
leading to hardware latch-up or degradation?
Should we disable ovdd before pwr18 here?
> if (err)
> - return err;
> + dev_err(dev, "cannot disable pwr18 regulator: %d",
> + err);
[Severity: Low]
Is this missing a trailing newline?
Without a \n in the format string, subsequent kernel log messages from other
subsystems might be concatenated on the same line, resulting in mangled
dmesg output.
> }
>
> if (pdata->ovdd) {
> err = regulator_disable(pdata->ovdd);
> if (err)
> - return err;
> + dev_err(dev, "cannot disable ovdd regulator: %d",
> + err);
[Severity: Low]
Does this dev_err() also need a trailing newline?
> }
>
> it6505->powered = false;
[Severity: High]
This is a pre-existing issue, but does it6505_int_threaded_handler() fail
to check it6505_read() for error codes?
If an I2C read fails due to a transient bus error or occurring during
power-down, it6505_read() returns a negative error code (e.g., -ENODEV).
This negative value is directly assigned to the int_status array:
drivers/gpu/drm/bridge/ite-it6505.c:it6505_int_threaded_handler() {
int_status[0] = it6505_read(it6505, INT_STATUS_01);
int_status[1] = it6505_read(it6505, INT_STATUS_02);
int_status[2] = it6505_read(it6505, INT_STATUS_03);
...
}
In two's complement, negative values have many high bits set. This causes
it6505_test_bit() to incorrectly evaluate to true for multiple random
interrupts.
Could this lead to the spurious execution of handlers and writing back garbage
to the interrupt clear register?
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1784947240.git.daniel@makrotopia.org?part=4
next prev parent reply other threads:[~2026-07-25 3:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-25 2:57 [PATCH v6 00/13] drm/bridge: it6505: DP audio support + shared-DAI hw_params fix Daniel Golle
2026-07-25 2:58 ` [PATCH v6 01/13] drm/bridge: it6505: quiesce event sources and work on remove() Daniel Golle
2026-07-25 3:23 ` sashiko-bot
2026-07-25 2:58 ` [PATCH v6 02/13] drm/bridge: it6505: balance and disable runtime PM on remove Daniel Golle
2026-07-25 3:18 ` sashiko-bot
2026-07-25 2:58 ` [PATCH v6 03/13] drm/bridge: it6505: unregister DP AUX adapter on bridge detach Daniel Golle
2026-07-25 3:17 ` sashiko-bot
2026-07-25 2:58 ` [PATCH v6 04/13] drm/bridge: it6505: complete poweroff even if disabling regulators fails Daniel Golle
2026-07-25 3:17 ` sashiko-bot [this message]
2026-07-25 2:58 ` [PATCH v6 05/13] drm/bridge: it6505: bail out of the IRQ handler when status reads fail Daniel Golle
2026-07-25 2:59 ` [PATCH v6 06/13] drm/bridge: it6505: avoid division by zero in pixel clock calculation Daniel Golle
2026-07-25 3:20 ` sashiko-bot
2026-07-25 2:59 ` [PATCH v6 07/13] drm/bridge: it6505: avoid division by zero in audio FS debug print Daniel Golle
2026-07-25 3:16 ` sashiko-bot
2026-07-25 2:59 ` [PATCH v6 08/13] drm/bridge: it6505: guard against zero channel count in audio infoframe Daniel Golle
2026-07-25 3:00 ` [PATCH v6 09/13] drm/bridge: it6505: hold endpoint OF node reference while parsing it Daniel Golle
2026-07-25 3:15 ` sashiko-bot
2026-07-25 3:00 ` [PATCH v6 10/13] drm/bridge: it6505: reject a too short link-frequencies property Daniel Golle
2026-07-25 3:00 ` [PATCH v6 11/13] drm/bridge: it6505: don't write an error code back to the reset register Daniel Golle
2026-07-25 3:19 ` sashiko-bot
2026-07-25 3:01 ` [PATCH v6 12/13] drm/bridge: it6505: Add audio support Daniel Golle
2026-07-25 5:25 ` sashiko-bot
2026-07-25 3:01 ` [PATCH v6 13/13] drm/bridge: it6505: Don't reject audio hw_params without an encoder Daniel Golle
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=20260725031800.62D9A1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=daniel@makrotopia.org \
--cc=dri-devel@lists.freedesktop.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.