diff options
author | Stanimir Varbanov <stanimir.varbanov@linaro.org> | 2020-11-11 15:37:52 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-13 09:09:16 +0100 |
commit | d33a94412ed1081f30d904cab54faea7c7b839fc (patch) | |
tree | 52b772e253dafa5272489a58ea73ae573c70396a /drivers/media/platform/qcom | |
parent | ddd1fc49b60822b29d476564a4b8509565cc51ab (diff) | |
download | linux-d33a94412ed1081f30d904cab54faea7c7b839fc.tar.gz |
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: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom')
-rw-r--r-- | drivers/media/platform/qcom/venus/pm_helpers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index a3850261d697..89f20c2255ea 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -939,6 +939,9 @@ static unsigned long calculate_inst_freq(struct venus_inst *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; /* 21 / 20 is overhead factor */ vpp_freq += vpp_freq / 20; |