aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanimir Varbanov <stanimir.varbanov@linaro.org>2020-03-04 12:09:49 +0200
committerStanimir Varbanov <stanimir.varbanov@linaro.org>2020-03-09 16:41:46 +0200
commitd2470e3979ea4a0fd08b4189b4afbccd78c8892b (patch)
tree97f53b8c921c8ee55195e2e85165999f46adb4ec
parentd171c45da874e3858a83e6377e00280a507fe2f2 (diff)
venus: firmware: Ignore secure call error on first resumevenus-fixes-v5.6venus-fixes
With the latest cleanup in qcom scm driver the secure monitor call for setting the remote processor state returns EINVAL when it is called for the first time and after another scm call auth_and_reset. The error returned from scm call could be ignored because the state transition is already done in auth_and_reset. Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
-rw-r--r--drivers/media/platform/qcom/venus/firmware.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
index d3d1748a7ef6..33f70e1def94 100644
--- a/drivers/media/platform/qcom/venus/firmware.c
+++ b/drivers/media/platform/qcom/venus/firmware.c
@@ -44,8 +44,14 @@ static void venus_reset_cpu(struct venus_core *core)
int venus_set_hw_state(struct venus_core *core, bool resume)
{
- if (core->use_tz)
- return qcom_scm_set_remote_state(resume, 0);
+ int ret;
+
+ if (core->use_tz) {
+ ret = qcom_scm_set_remote_state(resume, 0);
+ if (resume && ret == -EINVAL)
+ ret = 0;
+ return ret;
+ }
if (resume)
venus_reset_cpu(core);

Privacy Policy