lkml.org 
[lkml]   [2020]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.6 085/254] media: venus: firmware: Ignore secure call error on first resume
    Date
    From: Stanimir Varbanov <stanimir.varbanov@linaro.org>

    commit 2632e7b618a7730969f9782593c29ca53553aa22 upstream.

    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>
    Cc: stable@vger.kernel.org
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/media/platform/qcom/venus/firmware.c | 10 ++++++++--
    1 file changed, 8 insertions(+), 2 deletions(-)

    --- 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

    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);

    \
     
     \ /
      Last update: 2020-04-16 16:22    [W:3.566 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site