提交 d33a9441 编写于 作者: S Stanimir Varbanov 提交者: Mauro Carvalho Chehab

media: venus: pm_helpers: Check instance state when calculate instance frequency

Skip calculating instance frequency if it is not in running state.
Signed-off-by: NStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
上级 ddd1fc49
...@@ -939,6 +939,9 @@ static unsigned long calculate_inst_freq(struct venus_inst *inst, ...@@ -939,6 +939,9 @@ static unsigned long calculate_inst_freq(struct venus_inst *inst,
mbs_per_sec = load_per_instance(inst); mbs_per_sec = load_per_instance(inst);
if (inst->state != INST_START)
return 0;
vpp_freq = mbs_per_sec * inst->clk_data.codec_freq_data->vpp_freq; vpp_freq = mbs_per_sec * inst->clk_data.codec_freq_data->vpp_freq;
/* 21 / 20 is overhead factor */ /* 21 / 20 is overhead factor */
vpp_freq += vpp_freq / 20; vpp_freq += vpp_freq / 20;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册