From: Stanimir Varbanov Date: Wed, 11 Nov 2020 14:37:52 +0000 (+0100) Subject: media: venus: pm_helpers: Check instance state when calculate instance frequency X-Git-Tag: accepted/tizen/unified/20230118.172025~7835^2~209 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d33a94412ed1081f30d904cab54faea7c7b839fc;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index a385026..89f20c2 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;