Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Ram Prakash Gupta <quic_rampraka@quicinc.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>,
	Avri Altman <avri.altman@wdc.com>, <linux-scsi@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<quic_cang@quicinc.com>, <quic_nguyenb@quicinc.com>,
	<quic_pragalla@quicinc.com>, <quic_nitirawa@quicinc.com>
Subject: Re: [PATCH v2 1/2] scsi: ufs: Suspend clk scaling on no request
Date: Thu, 27 Jun 2024 22:29:33 +0530	[thread overview]
Message-ID: <75bca322-43df-9d4e-3dd8-804d9aa7f851@quicinc.com> (raw)
In-Reply-To: <97bb4c5a-46f3-4a81-96bf-a3147d9ec78b@acm.org>



On 6/27/2024 10:05 PM, Bart Van Assche wrote:
> On 6/27/24 1:37 AM, Ram Prakash Gupta wrote:
>> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
>> index 1b65e6ae4137..9f935e5c60e8 100644
>> --- a/drivers/ufs/core/ufshcd.c
>> +++ b/drivers/ufs/core/ufshcd.c
>> @@ -1560,7 +1560,8 @@ static int ufshcd_devfreq_target(struct device 
>> *dev,
>>           ktime_to_us(ktime_sub(ktime_get(), start)), ret);
>>   out:
>> -    if (sched_clk_scaling_suspend_work && !scale_up)
>> +    if (sched_clk_scaling_suspend_work &&
>> +            (!scale_up || hba->clk_scaling.suspend_on_no_request))
>>           queue_work(hba->clk_scaling.workq,
>>                  &hba->clk_scaling.suspend_work);
>> diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
>> index bad88bd91995..c14607f2890b 100644
>> --- a/include/ufs/ufshcd.h
>> +++ b/include/ufs/ufshcd.h
>> @@ -457,6 +457,7 @@ struct ufs_clk_scaling {
>>       bool is_initialized;
>>       bool is_busy_started;
>>       bool is_suspended;
>> +    bool suspend_on_no_request;
>>   };
>>   #define UFS_EVENT_HIST_LENGTH 8
> 
> Who are the other vendors that support clock scaling? I'm asking because
> I don't think that the behavior change introduced by this patch should
> depend on the SoC vendor.
> 
> Thanks,
> 
> Bart.

Hi Bart,

I guess, Mediatek is one vendor who is having this feature in use as I
see some fixes coming from Peter with respect to clk scaling, where some
power regression on mediatek chipsets were addressed.

Please check below link for background of this change and reason to keep
it vendor specific.
https://www.spinics.net/lists/linux-scsi/msg193591.html

Thanks,
Ram

  reply	other threads:[~2024-06-27 16:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27  8:37 [PATCH V2 0/2] Suspend clk scaling when there is no request Ram Prakash Gupta
2024-06-27  8:37 ` [PATCH v2 1/2] scsi: ufs: Suspend clk scaling on " Ram Prakash Gupta
2024-06-27 16:35   ` Bart Van Assche
2024-06-27 16:59     ` Ram Prakash Gupta [this message]
2024-06-27  8:37 ` [PATCH v2 2/2] scsi: ufs: qcom: Enable suspending " Ram Prakash Gupta
2024-06-27 16:36 ` [PATCH V2 0/2] Suspend clk scaling when there is " Bart Van Assche
2024-06-27 17:06   ` Ram Prakash Gupta
2024-06-28 19:34 ` Bart Van Assche
2024-07-05  2:48 ` Martin K. Petersen
2024-07-11  3:08 ` Martin K. Petersen

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=75bca322-43df-9d4e-3dd8-804d9aa7f851@quicinc.com \
    --to=quic_rampraka@quicinc.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=martin.petersen@oracle.com \
    --cc=quic_cang@quicinc.com \
    --cc=quic_nguyenb@quicinc.com \
    --cc=quic_nitirawa@quicinc.com \
    --cc=quic_pragalla@quicinc.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