linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] venus: core: remove CNOC voting while device suspend
@ 2020-04-10  7:17 Mansur Alisha Shaik
  2020-04-10  7:58 ` Stanimir Varbanov
  0 siblings, 1 reply; 2+ messages in thread
From: Mansur Alisha Shaik @ 2020-04-10  7:17 UTC (permalink / raw)
  To: linux-media, stanimir.varbanov
  Cc: linux-kernel, linux-arm-msm, vgarodia, mansur

The Venus driver is voting Configuration NoC during .probe but not clear
voting in .suspend. Because of this NoC is up during shutdown also. As a
consequence the whole device could leak energy while in .suspend.

So correct this by moving voting in .resume and unvoting
in .suspend

signed-off-by: mansur alisha shaik <mansur@codeaurora.org>
---
Changes in V2:
- As per stanimir comment changed the commit message.

 drivers/media/platform/qcom/venus/core.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 194b10b9..13fa507 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -242,10 +242,6 @@ static int venus_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000));
-	if (ret)
-		return ret;
-
 	ret = hfi_create(core, &venus_core_ops);
 	if (ret)
 		return ret;
@@ -350,6 +346,10 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev)
 	if (ret)
 		return ret;
 
+	ret = icc_set_bw(core->cpucfg_path, 0, 0);
+	if (ret)
+		return ret;
+
 	if (pm_ops->core_power)
 		ret = pm_ops->core_power(dev, POWER_OFF);
 
@@ -368,6 +368,10 @@ static __maybe_unused int venus_runtime_resume(struct device *dev)
 			return ret;
 	}
 
+	ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000));
+	if (ret)
+		return ret;
+
 	return hfi_core_resume(core, false);
 }
 
-- 
2.7.4


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

* Re: [PATCH V2] venus: core: remove CNOC voting while device suspend
  2020-04-10  7:17 [PATCH V2] venus: core: remove CNOC voting while device suspend Mansur Alisha Shaik
@ 2020-04-10  7:58 ` Stanimir Varbanov
  0 siblings, 0 replies; 2+ messages in thread
From: Stanimir Varbanov @ 2020-04-10  7:58 UTC (permalink / raw)
  To: Mansur Alisha Shaik, linux-media; +Cc: linux-kernel, linux-arm-msm, vgarodia

Thanks Mansur,

On 4/10/20 10:17 AM, Mansur Alisha Shaik wrote:
> The Venus driver is voting Configuration NoC during .probe but not clear
> voting in .suspend. Because of this NoC is up during shutdown also. As a
> consequence the whole device could leak energy while in .suspend.
> 
> So correct this by moving voting in .resume and unvoting
> in .suspend
> 
> signed-off-by: mansur alisha shaik <mansur@codeaurora.org>

Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>

Please configure git and use 'git commit -s' to sign off your commits
next time. I will correct that when applying.

> ---
> Changes in V2:
> - As per stanimir comment changed the commit message.
> 
>  drivers/media/platform/qcom/venus/core.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)

Acked-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>

-- 
regards,
Stan

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

end of thread, other threads:[~2020-04-10  7:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-10  7:17 [PATCH V2] venus: core: remove CNOC voting while device suspend Mansur Alisha Shaik
2020-04-10  7:58 ` Stanimir Varbanov

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).