From: sashiko-bot@kernel.org
To: "Thierry Reding" <thierry.reding@kernel.org>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH 3/9] drm/tegra: Explicitly specify PMC instance to use
Date: Wed, 06 May 2026 20:41:03 +0000 [thread overview]
Message-ID: <20260506204103.B359DC2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260506-pmc-v1-3-a6de5da7216b@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Resource Acquisition Order / Hardware Delay Inefficiency in tegra_dc_probe()
--
commit dfa12a000e50667e2028e62a77d85dddde33c3e6
Author: Thierry Reding <treding@nvidia.com>
drm/tegra: Explicitly specify PMC instance to use
Currently the kernel relies on a global variable to reference the PMC
context. Use an explicit lookup for the PMC and pass that to the public
PMC APIs.
> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> index 06370b7e0e567..e6099f5aced7a 100644
> --- a/drivers/gpu/drm/tegra/dc.c
> +++ b/drivers/gpu/drm/tegra/dc.c
> @@ -3231,12 +3232,17 @@ static int tegra_dc_probe(struct platform_device *pdev)
> clk_disable_unprepare(dc->clk);
>
> if (dc->soc->has_powergate) {
> + dc->pmc = devm_tegra_pmc_get(dc->dev);
> + if (IS_ERR(dc->pmc))
> + return dev_err_probe(dc->dev, PTR_ERR(dc->pmc),
> + "failed to get PMC\n");
> +
Would it be better to move devm_tegra_pmc_get() earlier in tegra_dc_probe()
before the hardware operations and delays?
Looking at tegra_dc_probe(), this lookup happens after clk_prepare_enable(),
reset_control_assert(), and multiple usleep_range(2000, 4000) delays.
If devm_tegra_pmc_get() returns -EPROBE_DEFER, the probe aborts after executing
4-8ms of synchronous hardware delays.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260506-pmc-v1-0-a6de5da7216b@nvidia.com?part=3
next prev parent reply other threads:[~2026-05-06 20:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 13:41 [PATCH 0/9] soc/tegra: pmc: Clean up legacy code Thierry Reding
2026-05-06 13:41 ` [PATCH 1/9] ata: ahci_tegra: Explicitly specify PMC instance to use Thierry Reding
2026-05-06 13:54 ` Damien Le Moal
2026-05-06 13:41 ` [PATCH 2/9] drm/nouveau: tegra: " Thierry Reding
2026-05-06 13:41 ` [PATCH 3/9] drm/tegra: " Thierry Reding
2026-05-06 20:41 ` sashiko-bot [this message]
2026-05-06 13:41 ` [PATCH 4/9] media: vde: " Thierry Reding
2026-05-06 13:41 ` [PATCH 5/9] PCI: tegra: " Thierry Reding
2026-05-06 20:55 ` sashiko-bot
2026-05-06 13:41 ` [PATCH 6/9] usb: xhci: " Thierry Reding
2026-05-06 13:41 ` [PATCH 7/9] soc/tegra: pmc: Create PMC context dynamically Thierry Reding
2026-05-06 21:40 ` sashiko-bot
2026-05-06 13:41 ` [PATCH 8/9] soc/tegra: pmc: Remove unused legacy functions Thierry Reding
2026-05-06 13:42 ` [PATCH 9/9] soc/tegra: pmc: Move legacy code behind CONFIG_ARM guard Thierry Reding
2026-05-06 22:37 ` sashiko-bot
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=20260506204103.B359DC2BCB0@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko@lists.linux.dev \
--cc=thierry.reding@kernel.org \
/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