Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: bbhatt@codeaurora.org
To: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: manivannan.sadhasivam@linaro.org, linux-arm-msm@vger.kernel.org,
	hemantk@codeaurora.org, linux-kernel@vger.kernel.org,
	linux-kernel-owner@vger.kernel.org
Subject: Re: [PATCH v3 2/7] bus: mhi: core: Introduce independent voting mechanism
Date: Wed, 20 May 2020 12:44:16 -0700	[thread overview]
Message-ID: <70f32d3dfc9dd81163897a57ebe35d02@codeaurora.org> (raw)
In-Reply-To: <a51d366e-5466-cbd0-b19c-61e76e8671b5@codeaurora.org>

On 2020-05-20 12:06, Jeffrey Hugo wrote:
> On 5/20/2020 12:43 PM, bbhatt@codeaurora.org wrote:
>> On 2020-05-20 09:54, Jeffrey Hugo wrote:
>>> On 5/18/2020 2:03 PM, Bhaumik Bhatt wrote:
>>>> Allow independent votes from clients such that they can choose to 
>>>> vote
>>>> for either the device or the bus or both. This helps in cases where 
>>>> the
>>>> device supports autonomous low power mode wherein it can move to M2
>>>> state without the need to notify the host. Clients can also vote 
>>>> only to
>>>> keep the underlying bus active without having the device in M0 state 
>>>> to
>>>> support offload use cases.
>>>> 
>>>> Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
>>>> ---
>>> 
>>> I wonder, why doesn't this fit with runtimePM?
>> Hi Jeff,
>> 
>> Can you elaborate?
>> 
>> In short, with this patch, MHI just wants to give controller the 
>> option to
>> choose the vote type so we can implement autonomous low power mode 
>> entries
>> on both host and device.
> 
> So, you are attempting to manage the power mode of the device.  The
> standard mechanism to do so in Linux is runtime pm.
> 
> https://elixir.bootlin.com/linux/latest/source/Documentation/driver-api/pm/devices.rst
> 
> I'm no runtime pm expert, but it feels like your whole voting
> mechanism, etc is just reimplemeting that.  Reimplementing the wheel,
> when its been a standard thing that the majority of the kernel uses is
> not usually acceptable.
> 
> IMO, you need some sort of justification why runtime pm is not
> applicable for you, because I'm willing to bet Mani/Greg are going to
> ask the same.
I think we can look at the patch as simply expanding the scope of what 
already exists.

The client here has been calling mhi_device_get/put/sync APIs to gain 
device vote and with
new features yet to come in, this introductory change is only 
re-purposing what voting
means going forward. i.e. allowing individual bus and device votes.

If you're suggesting using runtimePM APIs to replace the newly 
introduced bus vote, it
would be kind of overkill here IMO. Is that what you were getting at? 
Because currently,
we just have controllers use runtimePM and provide callbacks to them.

If you have ideas, we can discuss them.

  reply	other threads:[~2020-05-20 19:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-18 20:03 [PATCH v3 0/7] Introduce features and debugfs/sysfs entries for MHI Bhaumik Bhatt
2020-05-18 20:03 ` [PATCH v3 1/7] bus: mhi: core: Abort suspends due to outgoing pending packets Bhaumik Bhatt
2020-05-20 16:48   ` Jeffrey Hugo
2020-05-18 20:03 ` [PATCH v3 2/7] bus: mhi: core: Introduce independent voting mechanism Bhaumik Bhatt
2020-05-20 16:54   ` Jeffrey Hugo
2020-05-20 18:43     ` bbhatt
2020-05-20 19:06       ` Jeffrey Hugo
2020-05-20 19:44         ` bbhatt [this message]
2020-05-20 20:41           ` Jeffrey Hugo
2020-05-18 20:03 ` [PATCH v3 3/7] bus: mhi: core: Use generic name field for an MHI device Bhaumik Bhatt
2020-05-18 20:03 ` [PATCH v3 4/7] bus: mhi: core: Introduce helper function to check device state Bhaumik Bhatt
2020-05-18 20:03 ` [PATCH v3 5/7] bus: mhi: core: Introduce debugfs entries and counters for MHI Bhaumik Bhatt
2020-05-25  6:35   ` Greg KH
2020-05-18 20:04 ` [PATCH v3 6/7] bus: mhi: core: Read and save device hardware information from BHI Bhaumik Bhatt
2020-05-18 20:04 ` [PATCH v3 7/7] bus: mhi: core: Introduce sysfs entries for MHI Bhaumik Bhatt
2020-05-21 13:23 ` [PATCH v3 0/7] Introduce features and debugfs/sysfs " Manivannan Sadhasivam
2020-05-21 15:32   ` Manivannan Sadhasivam
2020-05-21 19:33   ` bbhatt

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=70f32d3dfc9dd81163897a57ebe35d02@codeaurora.org \
    --to=bbhatt@codeaurora.org \
    --cc=hemantk@codeaurora.org \
    --cc=jhugo@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel-owner@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.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