public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Frank Li <Frank.li@nxp.com>
Cc: <alexandre.belloni@bootlin.com>, <rafael@kernel.org>,
	<linux-i3c@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<linux-pm@vger.kernel.org>
Subject: Re: [PATCH V2 2/6] i3c: master: Mark last_busy on IBI when runtime PM is allowed
Date: Wed, 4 Feb 2026 20:24:21 +0200	[thread overview]
Message-ID: <a650c5c6-5975-40c6-828e-eaa27403adfd@intel.com> (raw)
In-Reply-To: <aYNveVUsiixWWlWL@lizhi-Precision-Tower-5810>

On 04/02/2026 18:10, Frank Li wrote:
> On Wed, Feb 04, 2026 at 01:15:07PM +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.
>>
>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>> ---
> 
> Although it is no harmful, I think it is not necessary to mark last busy.
> 
> schedule's workqueue task to do i3c transfer, which will call run time
> resume.
> 
> Are sure it will block your function without this patch?

It is not necessary at this time.  I wanted to cover the case
where an IBI is not followed by a transfer from the target
device driver.  Perhaps a device could operate almost entirely
using IBIs, but there is nothing like that presently.

Let me know if you think we should leave it for now.

> 
> Frank
> 
>>
>>
>> Changes in V2:
>>
>> 	Adjusted slightly for earlier changes
>>
>>
>>  drivers/i3c/master.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
>> index 49fb6e30a68e..48d1b1256290 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->dev.parent);
>> +
>>  	atomic_inc(&dev->ibi->pending_ibis);
>>  	queue_work(dev->ibi->wq, &slot->work);
>>  }
>> --
>> 2.51.0
>>


  reply	other threads:[~2026-02-04 18:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-04 11:15 [PATCH V2 0/6] i3c: mipi-i3c-hci-pci: Enable IBI while runtime suspended for Intel controllers Adrian Hunter
2026-02-04 11:15 ` [PATCH V2 1/6] i3c: mipi-i3c-hci-pci: Set d3hot_delay to 0 " Adrian Hunter
2026-02-04 11:15 ` [PATCH V2 2/6] i3c: master: Mark last_busy on IBI when runtime PM is allowed Adrian Hunter
2026-02-04 16:10   ` Frank Li
2026-02-04 18:24     ` Adrian Hunter [this message]
2026-02-04 21:45       ` Frank Li
2026-02-05  6:43         ` Adrian Hunter
2026-02-04 11:15 ` [PATCH V2 3/6] i3c: mipi-i3c-hci: Add quirk to allow IBI while runtime suspended Adrian Hunter
2026-02-04 15:54   ` Frank Li
2026-02-04 11:15 ` [PATCH V2 4/6] i3c: mipi-i3c-hci: Allow parent to manage runtime PM Adrian Hunter
2026-02-04 11:15 ` [PATCH V2 5/6] i3c: mipi-i3c-hci-pci: Add optional ability to manage child " Adrian Hunter
2026-02-04 16:06   ` Frank Li
2026-02-04 16:16     ` Rafael J. Wysocki
2026-02-04 18:27     ` Adrian Hunter
2026-02-04 11:15 ` [PATCH V2 6/6] i3c: mipi-i3c-hci-pci: Enable IBI while runtime suspended for Intel controllers Adrian Hunter
2026-02-04 16:07   ` Frank Li

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=a650c5c6-5975-40c6-828e-eaa27403adfd@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Frank.li@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@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