From: "Nirujogi, Pratap" <pnirujog@amd.com>
To: Andi Shyti <andi.shyti@kernel.org>,
Pratap Nirujogi <pratap.nirujogi@amd.com>
Cc: andriy.shevchenko@linux.intel.com, mlimonci@amd.com,
mika.westerberg@linux.intel.com, jsd@semihalf.com,
rafael.j.wysocki@intel.com, benjamin.chan@amd.com,
bin.du@amd.com, king.li@amd.com, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] i2c: designware: amdisp: Fix resume-probe race condition issue
Date: Wed, 25 Mar 2026 16:36:02 -0400 [thread overview]
Message-ID: <8b6c7ca6-839a-496b-ae75-c4c52b4cbd10@amd.com> (raw)
In-Reply-To: <acRCk2muSdoEvbEI@zenone.zhora.eu>
On 3/25/2026 4:17 PM, Andi Shyti wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> Hi Pratap,
>
> On Fri, Mar 20, 2026 at 04:12:22PM -0400, Pratap Nirujogi wrote:
>> Identified resume-probe race condition in kernel v7.0 with the commit
>> 38fa29b01a6a ("i2c: designware: Combine the init functions"),but this
>> issue existed from the beginning though not detected.
>>
>> The amdisp i2c device requires ISP to be in power-on state for probe
>> to succeed. To meet this requirement, this device is added to genpd
>> to control ISP power using runtime PM. The pm_runtime_get_sync() called
>> before i2c_dw_probe() triggers PM resume, which powers on ISP and also
>> invokes the amdisp i2c runtime resume before the probe completes resulting
>> in this race condition and a NULL dereferencing issue in v7.0
>>
>> Fix this race condition by using the genpd APIs directly during probe:
>> - Call dev_pm_genpd_resume() to Power ON ISP before probe
>> - Call dev_pm_genpd_suspend() to Power OFF ISP after probe
>> - Set the device to suspended state with pm_runtime_set_suspended()
>> - Enable runtime PM only after the device is fully initialized
>>
>> Fixes: d6263c468a761 ("i2c: amd-isp: Add ISP i2c-designware driver")
>> Co-developed-by: Bin Du <bin.du@amd.com>
>> Signed-off-by: Bin Du <bin.du@amd.com>
>> Signed-off-by: Pratap Nirujogi <pratap.nirujogi@amd.com>
>
> merged to i2c/i2c-host-fixes.
>
Thanks Andi.
> Thanks,
> Andi
prev parent reply other threads:[~2026-03-25 20:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 20:12 Pratap Nirujogi
2026-03-20 20:25 ` Andy Shevchenko
2026-03-20 20:32 ` Mario Limonciello (AMD) (kernel.org)
2026-03-23 5:54 ` Mika Westerberg
2026-03-25 20:17 ` Andi Shyti
2026-03-25 20:36 ` Nirujogi, Pratap [this message]
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=8b6c7ca6-839a-496b-ae75-c4c52b4cbd10@amd.com \
--to=pnirujog@amd.com \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=benjamin.chan@amd.com \
--cc=bin.du@amd.com \
--cc=jsd@semihalf.com \
--cc=king.li@amd.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=mlimonci@amd.com \
--cc=pratap.nirujogi@amd.com \
--cc=rafael.j.wysocki@intel.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
Powered by JetHome