linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] interconnect: qcom: msm8939: Use icc_sync_state
@ 2022-04-16  1:26 Leo Yan
  2022-04-28  7:19 ` Georgi Djakov
  2022-07-05  7:31 ` Leo Yan
  0 siblings, 2 replies; 5+ messages in thread
From: Leo Yan @ 2022-04-16  1:26 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Georgi Djakov, Bryan O'Donoghue,
	Dmitry Baryshkov, linux-arm-msm, linux-pm, linux-kernel
  Cc: Leo Yan

It's fashion to use the icc_sync_state callback to notify the framework
when all consumers are probed, so that the bandwidth request doesn't
need to stay on maximum value.

Do the same thing for msm8939 driver.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
 drivers/interconnect/qcom/msm8939.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/interconnect/qcom/msm8939.c b/drivers/interconnect/qcom/msm8939.c
index f9c2d7d3100d..ca5f611d33b0 100644
--- a/drivers/interconnect/qcom/msm8939.c
+++ b/drivers/interconnect/qcom/msm8939.c
@@ -1423,6 +1423,7 @@ static struct platform_driver msm8939_noc_driver = {
 	.driver = {
 		.name = "qnoc-msm8939",
 		.of_match_table = msm8939_noc_of_match,
+		.sync_state = icc_sync_state,
 	},
 };
 module_platform_driver(msm8939_noc_driver);
-- 
2.25.1


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

* Re: [PATCH] interconnect: qcom: msm8939: Use icc_sync_state
  2022-04-16  1:26 [PATCH] interconnect: qcom: msm8939: Use icc_sync_state Leo Yan
@ 2022-04-28  7:19 ` Georgi Djakov
  2022-04-28  8:41   ` Leo Yan
  2022-07-05  7:31 ` Leo Yan
  1 sibling, 1 reply; 5+ messages in thread
From: Georgi Djakov @ 2022-04-28  7:19 UTC (permalink / raw)
  To: Leo Yan, Andy Gross, Bjorn Andersson, Bryan O'Donoghue,
	Dmitry Baryshkov, linux-arm-msm, linux-pm, linux-kernel

On 16.04.22 4:26, Leo Yan wrote:
> It's fashion to use the icc_sync_state callback to notify the framework
> when all consumers are probed, so that the bandwidth request doesn't
> need to stay on maximum value.
> 
> Do the same thing for msm8939 driver.

I assume that you tested this with some out of tree DT? Is it public?
If the consumers are not described as such in DT and/or the support
in the client drivers is missing, paths might get disabled.

Thanks,
Georgi

> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---
>   drivers/interconnect/qcom/msm8939.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/interconnect/qcom/msm8939.c b/drivers/interconnect/qcom/msm8939.c
> index f9c2d7d3100d..ca5f611d33b0 100644
> --- a/drivers/interconnect/qcom/msm8939.c
> +++ b/drivers/interconnect/qcom/msm8939.c
> @@ -1423,6 +1423,7 @@ static struct platform_driver msm8939_noc_driver = {
>   	.driver = {
>   		.name = "qnoc-msm8939",
>   		.of_match_table = msm8939_noc_of_match,
> +		.sync_state = icc_sync_state,
>   	},
>   };
>   module_platform_driver(msm8939_noc_driver);


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

* Re: [PATCH] interconnect: qcom: msm8939: Use icc_sync_state
  2022-04-28  7:19 ` Georgi Djakov
@ 2022-04-28  8:41   ` Leo Yan
  0 siblings, 0 replies; 5+ messages in thread
From: Leo Yan @ 2022-04-28  8:41 UTC (permalink / raw)
  To: Georgi Djakov
  Cc: Andy Gross, Bjorn Andersson, Bryan O'Donoghue,
	Dmitry Baryshkov, linux-arm-msm, linux-pm, linux-kernel

On Thu, Apr 28, 2022 at 10:19:55AM +0300, Georgi Djakov wrote:
> On 16.04.22 4:26, Leo Yan wrote:
> > It's fashion to use the icc_sync_state callback to notify the framework
> > when all consumers are probed, so that the bandwidth request doesn't
> > need to stay on maximum value.
> > 
> > Do the same thing for msm8939 driver.
> 
> I assume that you tested this with some out of tree DT? Is it public?

Yes, Bryan is upstreaming for DT binding patch, see:
https://lore.kernel.org/all/20220419010903.3109514-3-bryan.odonoghue@linaro.org/

> If the consumers are not described as such in DT and/or the support
> in the client drivers is missing, paths might get disabled.

Indeed, when tested the mainline kernel on msm8939 (with several
offline patches for enabling msm8939), I observed that GPU and display
drivers are not enabled yet, so some interconnect paths are failed.
In this case, the interconnect clock stays on maximum frequency.

But I think this doesn't impact this patch; if without this patch,
icc_sync_state() will never be called and the global variable
'synced_state' is always false.

In other words, based on this patch and after initiailize all client
drivers, the clients' bandwdith request will be respected.

Thanks,
Leo

> > Signed-off-by: Leo Yan <leo.yan@linaro.org>
> > ---
> >   drivers/interconnect/qcom/msm8939.c | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/interconnect/qcom/msm8939.c b/drivers/interconnect/qcom/msm8939.c
> > index f9c2d7d3100d..ca5f611d33b0 100644
> > --- a/drivers/interconnect/qcom/msm8939.c
> > +++ b/drivers/interconnect/qcom/msm8939.c
> > @@ -1423,6 +1423,7 @@ static struct platform_driver msm8939_noc_driver = {
> >   	.driver = {
> >   		.name = "qnoc-msm8939",
> >   		.of_match_table = msm8939_noc_of_match,
> > +		.sync_state = icc_sync_state,
> >   	},
> >   };
> >   module_platform_driver(msm8939_noc_driver);
> 

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

* Re: [PATCH] interconnect: qcom: msm8939: Use icc_sync_state
  2022-04-16  1:26 [PATCH] interconnect: qcom: msm8939: Use icc_sync_state Leo Yan
  2022-04-28  7:19 ` Georgi Djakov
@ 2022-07-05  7:31 ` Leo Yan
  2022-07-05 13:58   ` Georgi Djakov
  1 sibling, 1 reply; 5+ messages in thread
From: Leo Yan @ 2022-07-05  7:31 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Georgi Djakov, Bryan O'Donoghue,
	Dmitry Baryshkov, linux-arm-msm, linux-pm, linux-kernel

Hi Georgi, Bjorn,

On Sat, Apr 16, 2022 at 09:26:34AM +0800, Leo Yan wrote:
> It's fashion to use the icc_sync_state callback to notify the framework
> when all consumers are probed, so that the bandwidth request doesn't
> need to stay on maximum value.
> 
> Do the same thing for msm8939 driver.

Ping for this patch.  This patch is needed for enabling ICC driver on
msm8939, I verified it based on Bryan O'Donoghue's DT binding patches.

Please see the branch which contains complete patches:
https://git.linaro.org/people/leo.yan/linux.git/log/?h=v5.19-rc4%2bicc_sleep_clock_v2

Thanks,
Leo

> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---
>  drivers/interconnect/qcom/msm8939.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/interconnect/qcom/msm8939.c b/drivers/interconnect/qcom/msm8939.c
> index f9c2d7d3100d..ca5f611d33b0 100644
> --- a/drivers/interconnect/qcom/msm8939.c
> +++ b/drivers/interconnect/qcom/msm8939.c
> @@ -1423,6 +1423,7 @@ static struct platform_driver msm8939_noc_driver = {
>  	.driver = {
>  		.name = "qnoc-msm8939",
>  		.of_match_table = msm8939_noc_of_match,
> +		.sync_state = icc_sync_state,
>  	},
>  };
>  module_platform_driver(msm8939_noc_driver);
> -- 
> 2.25.1
> 

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

* Re: [PATCH] interconnect: qcom: msm8939: Use icc_sync_state
  2022-07-05  7:31 ` Leo Yan
@ 2022-07-05 13:58   ` Georgi Djakov
  0 siblings, 0 replies; 5+ messages in thread
From: Georgi Djakov @ 2022-07-05 13:58 UTC (permalink / raw)
  To: Leo Yan, Andy Gross, Bjorn Andersson, Bryan O'Donoghue,
	Dmitry Baryshkov, linux-arm-msm, linux-pm, linux-kernel


On 5.07.22 10:31, Leo Yan wrote:
> Hi Georgi, Bjorn,
> 
> On Sat, Apr 16, 2022 at 09:26:34AM +0800, Leo Yan wrote:
>> It's fashion to use the icc_sync_state callback to notify the framework
>> when all consumers are probed, so that the bandwidth request doesn't
>> need to stay on maximum value.
>>
>> Do the same thing for msm8939 driver.
> 
> Ping for this patch.  This patch is needed for enabling ICC driver on
> msm8939, I verified it based on Bryan O'Donoghue's DT binding patches.
> 
> Please see the branch which contains complete patches:
> https://git.linaro.org/people/leo.yan/linux.git/log/?h=v5.19-rc4%2bicc_sleep_clock_v2
> 

Ok, thanks for verifying it. Merged.

BR,
Georgi

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

end of thread, other threads:[~2022-07-05 14:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-16  1:26 [PATCH] interconnect: qcom: msm8939: Use icc_sync_state Leo Yan
2022-04-28  7:19 ` Georgi Djakov
2022-04-28  8:41   ` Leo Yan
2022-07-05  7:31 ` Leo Yan
2022-07-05 13:58   ` Georgi Djakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).