Skip to content

Commit 2632e7b

Browse files
Stanimir Varbanovmchehab
authored andcommitted
media: venus: firmware: Ignore secure call error on first resume
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 <[email protected]> Signed-off-by: Stanimir Varbanov <[email protected]> Cc: [email protected] Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent ad71693 commit 2632e7b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/media/platform/qcom/venus/firmware.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,14 @@ static void venus_reset_cpu(struct venus_core *core)
4444

4545
int venus_set_hw_state(struct venus_core *core, bool resume)
4646
{
47-
if (core->use_tz)
48-
return qcom_scm_set_remote_state(resume, 0);
47+
int ret;
48+
49+
if (core->use_tz) {
50+
ret = qcom_scm_set_remote_state(resume, 0);
51+
if (resume && ret == -EINVAL)
52+
ret = 0;
53+
return ret;
54+
}
4955

5056
if (resume)
5157
venus_reset_cpu(core);

0 commit comments

Comments
 (0)