From: "Nirujogi, Pratap" <pnirujog@amd.com>
To: Guangshuo Li <lgs201920130244@gmail.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Nirujogi Pratap <pratap.nirujogi@amd.com>,
Bin Du <bin.du@amd.com>, Andi Shyti <andi.shyti@kernel.org>,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c: designware: amdisp: balance genpd on probe failure
Date: Wed, 8 Jul 2026 11:36:45 -0400 [thread overview]
Message-ID: <4321266e-027d-44ae-8b29-7d11373d9c1b@amd.com> (raw)
In-Reply-To: <20260708090552.739789-1-lgs201920130244@gmail.com>
On 7/8/2026 5:05 AM, Guangshuo Li wrote:
> [You don't often get email from lgs201920130244@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> The change referenced by the Fixes tag avoids a runtime PM resume during
> probe by powering the ISP domain directly with dev_pm_genpd_resume()
> before calling i2c_dw_probe(). Runtime PM is enabled only after
> i2c_dw_probe() has succeeded.
>
> However, the i2c_dw_probe() failure path still uses the old runtime PM
> cleanup path. At that point pm_runtime_enable() has not been called yet,
> so pm_runtime_disable() is not paired with any enable. The failure path
> also skips the dev_pm_genpd_suspend() needed to balance the direct
> dev_pm_genpd_resume() call.
>
> Suspend the genpd on the i2c_dw_probe() failure path instead of disabling
> runtime PM. This keeps the direct genpd resume/suspend pairing symmetric
> on both success and failure paths.
>
> Fixes: e2f1ada8e089 ("i2c: designware: amdisp: Fix resume-probe race condition issue")
> Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
> ---
> drivers/i2c/busses/i2c-designware-amdisp.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-amdisp.c b/drivers/i2c/busses/i2c-designware-amdisp.c
> index 9f0ec0fae6f2..724cb05e21c8 100644
> --- a/drivers/i2c/busses/i2c-designware-amdisp.c
> +++ b/drivers/i2c/busses/i2c-designware-amdisp.c
> @@ -81,7 +81,7 @@ static int amd_isp_dw_i2c_plat_probe(struct platform_device *pdev)
> ret = i2c_dw_probe(isp_i2c_dev);
> if (ret) {
> dev_err_probe(&pdev->dev, ret, "i2c_dw_probe failed\n");
> - goto error_release_rpm;
> + goto error_suspend_genpd;
> }
> dev_pm_genpd_suspend(&pdev->dev);
> pm_runtime_set_suspended(&pdev->dev);
> @@ -89,8 +89,8 @@ static int amd_isp_dw_i2c_plat_probe(struct platform_device *pdev)
>
> return 0;
>
> -error_release_rpm:
> - amd_isp_dw_i2c_plat_pm_cleanup(isp_i2c_dev);
> +error_suspend_genpd:
> + dev_pm_genpd_suspend(&pdev->dev);
> return ret;
> }
>
Good catch! I overlooked that earlier. Thanks.
Acked-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
> --
> 2.43.0
>
next prev parent reply other threads:[~2026-07-08 15:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 9:05 [PATCH] i2c: designware: amdisp: balance genpd on probe failure Guangshuo Li
2026-07-08 14:24 ` Andy Shevchenko
2026-07-08 15:36 ` Nirujogi, Pratap [this message]
2026-07-09 6:04 ` Mukesh Savaliya
2026-07-09 7:26 ` Bin Du
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=4321266e-027d-44ae-8b29-7d11373d9c1b@amd.com \
--to=pnirujog@amd.com \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bin.du@amd.com \
--cc=lgs201920130244@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=pratap.nirujogi@amd.com \
/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