Commit 21926d46 authored by Mansur Alisha Shaik's avatar Mansur Alisha Shaik Committed by Mauro Carvalho Chehab

media: venus: core: change clk enable and disable order in resume and suspend

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: 07f8f22a ("media: venus: core: remove CNOC voting while device
Signed-off-by: default avatarMansur Alisha Shaik <mansur@codeaurora.org>
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent de04408f
......@@ -355,12 +355,15 @@ static __maybe_unused int venus_runtime_suspend(struct device *dev)
if (ret)
return ret;
ret = icc_set_bw(core->cpucfg_path, 0, 0);
if (pm_ops->core_power) {
ret = pm_ops->core_power(dev, POWER_OFF);
if (ret)
return ret;
}
if (pm_ops->core_power)
ret = pm_ops->core_power(dev, POWER_OFF);
ret = icc_set_bw(core->cpucfg_path, 0, 0);
if (ret)
return ret;
return ret;
}
......@@ -371,15 +374,15 @@ static __maybe_unused int venus_runtime_resume(struct device *dev)
const struct venus_pm_ops *pm_ops = core->pm_ops;
int ret;
if (pm_ops->core_power) {
ret = pm_ops->core_power(dev, POWER_ON);
ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000));
if (ret)
return ret;
}
ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000));
if (pm_ops->core_power) {
ret = pm_ops->core_power(dev, POWER_ON);
if (ret)
return ret;
}
return hfi_core_resume(core, false);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment