From: Frank Li <Frank.li@nxp.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: alexandre.belloni@bootlin.com, linux-i3c@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH 3/7] i3c: master: Mark last_busy on IBI when runtime PM is allowed
Date: Thu, 29 Jan 2026 15:55:40 -0500 [thread overview]
Message-ID: <aXvJTPWhQwFfv57G@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <1db7b04b-ee65-4791-8db5-0dffc7befca2@intel.com>
On Thu, Jan 29, 2026 at 10:42:32PM +0200, Adrian Hunter wrote:
> On 29/01/2026 21:56, Frank Li wrote:
> > On Thu, Jan 29, 2026 at 08:18:37PM +0200, Adrian Hunter wrote:
> >> When an IBI can be received after the controller is
> >> pm_runtime_put_autosuspend()'ed, the interrupt may occur just before the
> >> device is auto‑suspended. In such cases, the runtime PM core may not see
> >> any recent activity and may suspend the device earlier than intended.
> >>
> >> Mark the controller as last busy whenever an IBI is queued (when
> >> rpm_ibi_allowed is set) so that the auto-suspend delay correctly reflects
> >> recent bus activity and avoids premature suspension.
> >
> > look like this can't resolve problem. pm_runtime_mark_last_busy() just
> > change dev->power.last_busy. If suspend before it, nothing happen.
>
> It should be effective.
>
> rpm_suspend() recalculates the autosuspend expiry time based on
> last_busy (see pm_runtime_autosuspend_expiration()) and restarts
> the timer is it is in the future.
>
> >
> > irq use thread irq, in irq thread call pm_runtime_resume() if needs.
> >
> > And this function call by irq handle, just put to work queue, what's impact
> > if do nothing here?
>
> Just premature runtime suspension inconsistent with autosuspend_delay.
CPU 0 CPU 1
1. rpm_suspend() 2. pm_runtime_mark_last_busy(master->rpm_dev)
if 2 happen before 1, it can extend suspend. 2 happen after 1, it should
do nothing.
Frank
>
> >
> > Frank
> >
> >>
> >> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> >> ---
> >> drivers/i3c/master.c | 5 +++++
> >> 1 file changed, 5 insertions(+)
> >>
> >> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
> >> index bcc493dc9d04..dcc07ebc50a2 100644
> >> --- a/drivers/i3c/master.c
> >> +++ b/drivers/i3c/master.c
> >> @@ -2721,9 +2721,14 @@ static void i3c_master_unregister_i3c_devs(struct i3c_master_controller *master)
> >> */
> >> void i3c_master_queue_ibi(struct i3c_dev_desc *dev, struct i3c_ibi_slot *slot)
> >> {
> >> + struct i3c_master_controller *master = i3c_dev_get_master(dev);
> >> +
> >> if (!dev->ibi || !slot)
> >> return;
> >>
> >> + if (master->rpm_ibi_allowed)
> >> + pm_runtime_mark_last_busy(master->rpm_dev);
> >> +
> >> atomic_inc(&dev->ibi->pending_ibis);
> >> queue_work(dev->ibi->wq, &slot->work);
> >> }
> >> --
> >> 2.51.0
> >>
>
next prev parent reply other threads:[~2026-01-29 20:55 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 18:18 [PATCH 0/7] i3c: mipi-i3c-hci-pci: Enable IBI while runtime suspended for Intel controllers Adrian Hunter
2026-01-29 18:18 ` [PATCH 1/7] i3c: mipi-i3c-hci-pci: Set d3hot_delay to 0 " Adrian Hunter
2026-01-29 19:43 ` Frank Li
2026-01-29 18:18 ` [PATCH 2/7] i3c: master: Allow controller drivers to select runtime PM device Adrian Hunter
2026-01-29 18:18 ` [PATCH 3/7] i3c: master: Mark last_busy on IBI when runtime PM is allowed Adrian Hunter
2026-01-29 19:56 ` Frank Li
2026-01-29 20:42 ` Adrian Hunter
2026-01-29 20:55 ` Frank Li [this message]
2026-01-30 7:48 ` Adrian Hunter
2026-01-29 18:18 ` [PATCH 4/7] i3c: mipi-i3c-hci: Add quirk to allow IBI while runtime suspended Adrian Hunter
2026-01-29 18:18 ` [PATCH 5/7] i3c: mipi-i3c-hci: Allow parent to manage runtime PM Adrian Hunter
2026-01-29 20:00 ` Frank Li
2026-01-29 20:28 ` Adrian Hunter
2026-01-29 21:00 ` Frank Li
2026-01-30 7:00 ` Adrian Hunter
2026-01-30 15:04 ` Frank Li
2026-01-30 16:34 ` Adrian Hunter
2026-01-30 17:11 ` Frank Li
2026-02-02 16:25 ` Frank Li
2026-02-03 12:54 ` Adrian Hunter
2026-02-03 15:59 ` Frank Li
2026-02-03 16:22 ` Wysocki, Rafael J
2026-02-03 16:57 ` Adrian Hunter
2026-02-03 20:20 ` Rafael J. Wysocki
2026-01-29 18:18 ` [PATCH 6/7] i3c: mipi-i3c-hci-pci: Add optional ability to manage child " Adrian Hunter
2026-01-29 18:18 ` [PATCH 7/7] i3c: mipi-i3c-hci-pci: Enable IBI while runtime suspended for Intel controllers Adrian Hunter
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=aXvJTPWhQwFfv57G@lizhi-Precision-Tower-5810 \
--to=frank.li@nxp.com \
--cc=adrian.hunter@intel.com \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-i3c@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.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
all inboxes | Powered by JetHome®