linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] venus: guard load_scale
@ 2020-11-10  6:46 Fritz Koenig
  2020-11-14 20:06 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Fritz Koenig @ 2020-11-10  6:46 UTC (permalink / raw)
  To: linux-media, linux-arm-msm, linux-kernel, stanimir.varbanov,
	vgarodia, dikshita, acourbot, tfiga
  Cc: Fritz Koenig

load_scale can only be safely called after
the encoder has been initialized.

Signed-off-by: Fritz Koenig <frkoenig@chromium.org>
---
 drivers/media/platform/qcom/venus/pm_helpers.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/platform/qcom/venus/pm_helpers.h b/drivers/media/platform/qcom/venus/pm_helpers.h
index aa2f6afa23544..32e27db1fa740 100644
--- a/drivers/media/platform/qcom/venus/pm_helpers.h
+++ b/drivers/media/platform/qcom/venus/pm_helpers.h
@@ -35,6 +35,10 @@ static inline int venus_pm_load_scale(struct venus_inst *inst)
 	if (!core->pm_ops || !core->pm_ops->load_scale)
 		return 0;
 
+	if (inst->session_type == VIDC_SESSION_TYPE_ENC &&
+	    inst->enc_state == VENUS_ENC_STATE_INIT)
+		return 0;
+
 	return core->pm_ops->load_scale(inst);
 }
 
-- 
2.29.2.299.gdc1121823c-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-14 20:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10  6:46 [PATCH] venus: guard load_scale Fritz Koenig
2020-11-14 20:06 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).