mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] slimbus: qcom-ngd-ctrl: Reduce auto suspend delay
@ 2024-03-04 13:50 Viken Dadhaniya
  2024-03-05 21:16 ` Konrad Dybcio
  0 siblings, 1 reply; 3+ messages in thread
From: Viken Dadhaniya @ 2024-03-04 13:50 UTC (permalink / raw)
  To: andersson, konrad.dybcio, srinivas.kandagatla, linux-arm-msm,
	alsa-devel, linux-kernel
  Cc: quic_msavaliy, quic_vtanuku, quic_anupkulk, quic_cchiluve,
	Viken Dadhaniya

Currently we have auto suspend delay of 1s which is
very high and it takes long time to driver for runtime
suspend after use case is done.

Hence to optimize runtime PM ops, reduce auto suspend
delay to 100ms.

Signed-off-by: Viken Dadhaniya <quic_vdadhani@quicinc.com>
---
 drivers/slimbus/qcom-ngd-ctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
index efeba8275a66..5de45a0e3da5 100644
--- a/drivers/slimbus/qcom-ngd-ctrl.c
+++ b/drivers/slimbus/qcom-ngd-ctrl.c
@@ -81,7 +81,7 @@
 #define SLIM_USR_MC_DISCONNECT_PORT	0x2E
 #define SLIM_USR_MC_REPEAT_CHANGE_VALUE	0x0
 
-#define QCOM_SLIM_NGD_AUTOSUSPEND	MSEC_PER_SEC
+#define QCOM_SLIM_NGD_AUTOSUSPEND	(MSEC_PER_SEC / 10)
 #define SLIM_RX_MSGQ_TIMEOUT_VAL	0x10000
 
 #define SLIM_LA_MGR	0xFF
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] slimbus: qcom-ngd-ctrl: Reduce auto suspend delay
  2024-03-04 13:50 [PATCH v1] slimbus: qcom-ngd-ctrl: Reduce auto suspend delay Viken Dadhaniya
@ 2024-03-05 21:16 ` Konrad Dybcio
  2024-03-08 12:43   ` Viken Dadhaniya
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Dybcio @ 2024-03-05 21:16 UTC (permalink / raw)
  To: Viken Dadhaniya, andersson, srinivas.kandagatla, linux-arm-msm,
	alsa-devel, linux-kernel
  Cc: quic_msavaliy, quic_vtanuku, quic_anupkulk, quic_cchiluve



On 3/4/24 14:50, Viken Dadhaniya wrote:
> Currently we have auto suspend delay of 1s which is
> very high and it takes long time to driver for runtime
> suspend after use case is done.
> 
> Hence to optimize runtime PM ops, reduce auto suspend
> delay to 100ms.
> 
> Signed-off-by: Viken Dadhaniya <quic_vdadhani@quicinc.com>
> ---

What determines 1s to be high and 100ms to be low enough? Could
you share some more reasoning?

>   drivers/slimbus/qcom-ngd-ctrl.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c b/drivers/slimbus/qcom-ngd-ctrl.c
> index efeba8275a66..5de45a0e3da5 100644
> --- a/drivers/slimbus/qcom-ngd-ctrl.c
> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
> @@ -81,7 +81,7 @@
>   #define SLIM_USR_MC_DISCONNECT_PORT	0x2E
>   #define SLIM_USR_MC_REPEAT_CHANGE_VALUE	0x0
>   
> -#define QCOM_SLIM_NGD_AUTOSUSPEND	MSEC_PER_SEC
> +#define QCOM_SLIM_NGD_AUTOSUSPEND	(MSEC_PER_SEC / 10)

This could be a good opportunity to inline this value..

Konrad

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] slimbus: qcom-ngd-ctrl: Reduce auto suspend delay
  2024-03-05 21:16 ` Konrad Dybcio
@ 2024-03-08 12:43   ` Viken Dadhaniya
  0 siblings, 0 replies; 3+ messages in thread
From: Viken Dadhaniya @ 2024-03-08 12:43 UTC (permalink / raw)
  To: Konrad Dybcio, andersson, srinivas.kandagatla, linux-arm-msm,
	alsa-devel, linux-kernel
  Cc: quic_msavaliy, quic_vtanuku, quic_anupkulk, quic_cchiluve



On 3/6/2024 2:46 AM, Konrad Dybcio wrote:
> 
> 
> On 3/4/24 14:50, Viken Dadhaniya wrote:
>> Currently we have auto suspend delay of 1s which is
>> very high and it takes long time to driver for runtime
>> suspend after use case is done.
>>
>> Hence to optimize runtime PM ops, reduce auto suspend
>> delay to 100ms.
>>
>> Signed-off-by: Viken Dadhaniya <quic_vdadhani@quicinc.com>
>> ---
> 
> What determines 1s to be high and 100ms to be low enough? Could
> you share some more reasoning?

Right now we don't have exact number which can quantify either power or 
performance. But we are following small window so as to not keep timer 
running longer while having resources like Clock ON. Theoretically and 
testing wise, this is not creating any side effect too.

> 
>>   drivers/slimbus/qcom-ngd-ctrl.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/slimbus/qcom-ngd-ctrl.c 
>> b/drivers/slimbus/qcom-ngd-ctrl.c
>> index efeba8275a66..5de45a0e3da5 100644
>> --- a/drivers/slimbus/qcom-ngd-ctrl.c
>> +++ b/drivers/slimbus/qcom-ngd-ctrl.c
>> @@ -81,7 +81,7 @@
>>   #define SLIM_USR_MC_DISCONNECT_PORT    0x2E
>>   #define SLIM_USR_MC_REPEAT_CHANGE_VALUE    0x0
>> -#define QCOM_SLIM_NGD_AUTOSUSPEND    MSEC_PER_SEC
>> +#define QCOM_SLIM_NGD_AUTOSUSPEND    (MSEC_PER_SEC / 10)
> 
> This could be a good opportunity to inline this value..

Updated in v2.

> 
> Konrad

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-08 12:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-04 13:50 [PATCH v1] slimbus: qcom-ngd-ctrl: Reduce auto suspend delay Viken Dadhaniya
2024-03-05 21:16 ` Konrad Dybcio
2024-03-08 12:43   ` Viken Dadhaniya

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®