From: sashiko-bot@kernel.org
To: "Sasha Levin" <sashal@kernel.org>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 3/3] drm/nouveau/tegra: Keep the fuse clock enabled while the GPU is powered
Date: Tue, 13 Oct 2026 14:58:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-169954@kernel.org> (raw)
In-Reply-To: <20261013145210.103565-3-sashal@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] nouveau: tegra: clk_fuse leak on power_down failure
--
commit 4446c1485fff0b05a5e79c1e4d70e14c4beda300
Author: Sasha Levin <sashal@kernel.org>
drm/nouveau/tegra: Keep the fuse clock enabled while the GPU is powered
This commit modifies nouveau's Tegra power management sequence to keep the
fuse clock enabled while the GPU is powered. This resolves an issue where
the GM20B GPU would fail to initialize on some boots.
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> index 3c8d0878891ad..31f8eaa9d6509 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
[ ... ]
> @@ -95,6 +100,8 @@ nvkm_device_tegra_power_down(struct nvkm_device_tegra *tdev)
> return ret;
> }
>
> + clk_disable_unprepare(tdev->clk_fuse);
> +
> return 0;
> }
[Severity: Medium]
Does this code leak the clk_fuse enable and prepare counts if
regulator_disable() fails?
If regulator_disable() fails and returns an error, the function immediately
returns early. Because the new clk_disable_unprepare() call is positioned
at the very end of this function, it is skipped entirely on this error path.
Since callers like nvkm_device_tegra_dtor() ignore the return value of
nvkm_device_tegra_power_down() and proceed to free the device structure,
would this result in a permanent resource leak where the clk_fuse's prepare
and enable counts are never decremented?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261013145210.103565-1-sashal@kernel.org?part=3
next prev parent reply other threads:[~2026-10-13 14:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 14:52 [PATCH 1/3] dt-bindings: gpu: nvidia,gk20a: Allow a fuse clock after the reference clock Sasha Levin
2026-10-13 14:52 ` [PATCH 2/3] arm64: tegra: Add the fuse clock to the Tegra210 GPU Sasha Levin
2026-10-13 15:37 ` Thierry Reding
2026-10-13 14:52 ` [PATCH 3/3] drm/nouveau/tegra: Keep the fuse clock enabled while the GPU is powered Sasha Levin
2026-10-13 14:58 ` sashiko-bot [this message]
2026-10-13 15:44 ` Thierry Reding
2026-10-13 15:36 ` [PATCH 1/3] dt-bindings: gpu: nvidia,gk20a: Allow a fuse clock after the reference clock Thierry Reding
2026-10-13 15:46 ` Thierry Reding
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=sashiko-outbox-169954@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=robh@kernel.org \
--cc=sashal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox