summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorMansur Alisha Shaik <mansur@codeaurora.org>2020-10-19 06:18:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:53:12 +0100
commit9acc5fa0aeb29a3124e8f0e557324b466e06308f (patch)
treeb5abe2347f331f63b9224a4bccff7298c75d1448 /drivers/media
parent393957d3976238dbcd0f645f67184fae00124dc1 (diff)
media: venus: core: change clk enable and disable order in resume and suspend
[ Upstream commit 21926d466e3a4f35c2536244d1d56512cc81a0a9 ] Currently video driver is voting after clk enable and un voting before clk disable. This is incorrect, video driver should vote before clk enable and unvote after clk disable. Corrected this by changing the order of clk enable and clk disable. suspend") Fixes: 07f8f22a33a9e ("media: venus: core: remove CNOC voting while device Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/platform/qcom/venus/core.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 6103aaf43987..52a3886c496e 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -355,13 +355,16 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev)
if (ret)
return ret;
+ if (pm_ops->core_power) {
+ ret = pm_ops->core_power(dev, POWER_OFF);
+ 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);
-
return ret;
}
@@ -371,16 +374,16 @@ static __maybe_unused int venus_runtime_resume(struct device *dev)
const struct venus_pm_ops *pm_ops = core->pm_ops;
int ret;
+ ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000));
+ if (ret)
+ return ret;
+
if (pm_ops->core_power) {
ret = pm_ops->core_power(dev, POWER_ON);
if (ret)
return ret;
}
- ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000));
- if (ret)
- return ret;
-
return hfi_core_resume(core, false);
}