aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMansur Alisha Shaik <mansur@codeaurora.org>2020-04-10 12:47:25 +0530
committerStanimir Varbanov <stanimir.varbanov@linaro.org>2020-04-13 12:10:42 +0300
commit0478a4dbb49856f941f1a2349d39000600f39821 (patch)
tree3222a463167a096083cc7e04e9ce2c8bac1e6e97
parent31e6dcba78e96d8a057885abe955310a5fc4efd5 (diff)
venus: core: remove CNOC voting while device suspendvenus-for-v5.8venus-for-next-v5.8
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: Stanimir Varbanov <stanimir.varbanov@linaro.org>
-rw-r--r--drivers/media/platform/qcom/venus/core.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 12688f04d32c..4395cb96fb04 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -244,10 +244,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;
@@ -353,6 +349,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);
@@ -371,6 +371,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);
}

Privacy Policy