Skip to content
Snippets Groups Projects
Commit c22b1a29 authored by Dikshita Agarwal's avatar Dikshita Agarwal Committed by Mauro Carvalho Chehab
Browse files

media: venus: core,pm: Vote for min clk freq during venus boot


Vote for min clk frequency for core clks during prepare and enable clocks
at boot sequence. Without this the controller clock runs at very low value
(9.6MHz) which is not sufficient to boot venus.

Signed-off-by: default avatarDikshita Agarwal <dikshita@codeaurora.org>
Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: default avatarStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent f24afa95
No related branches found
No related tags found
No related merge requests found
...@@ -41,10 +41,24 @@ static int core_clks_get(struct venus_core *core) ...@@ -41,10 +41,24 @@ static int core_clks_get(struct venus_core *core)
static int core_clks_enable(struct venus_core *core) static int core_clks_enable(struct venus_core *core)
{ {
const struct venus_resources *res = core->res; const struct venus_resources *res = core->res;
const struct freq_tbl *freq_tbl = core->res->freq_tbl;
unsigned int freq_tbl_size = core->res->freq_tbl_size;
unsigned long freq;
unsigned int i; unsigned int i;
int ret; int ret;
if (!freq_tbl)
return -EINVAL;
freq = freq_tbl[freq_tbl_size - 1].freq;
for (i = 0; i < res->clks_num; i++) { for (i = 0; i < res->clks_num; i++) {
if (IS_V6(core)) {
ret = clk_set_rate(core->clks[i], freq);
if (ret)
goto err;
}
ret = clk_prepare_enable(core->clks[i]); ret = clk_prepare_enable(core->clks[i]);
if (ret) if (ret)
goto err; goto err;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment