msm: eva: Fix power collapse failure

In case there is a live but unused DSP session.

Change-Id: I7dd0d7baeb89365a2d8ba6905ddffd1e5569c872
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
This commit is contained in:
George Shen
2022-07-07 14:05:29 -07:00
committed by Gerrit - the friendly Code Review server
parent 1f62f73764
commit 98cd09c61f
3 changed files with 7 additions and 9 deletions

View File

@@ -241,8 +241,8 @@ static int __dsp_suspend(struct iris_hfi_device *device, bool force, u32 flags)
/* don't suspend if cvp session is not paused */ /* don't suspend if cvp session is not paused */
if (!(temp->flags & SESSION_PAUSE)) { if (!(temp->flags & SESSION_PAUSE)) {
dprintk(CVP_DSP, dprintk(CVP_DSP,
"%s: cvp session %x not paused\n", "%s: cvp session %x not paused %d\n",
__func__, hash32_ptr(temp)); __func__, hash32_ptr(temp), gfa_cv.state);
return -EBUSY; return -EBUSY;
} }
} }

View File

@@ -168,7 +168,8 @@ void *msm_cvp_open(int core_id, int session_type)
} }
pr_info_ratelimited( pr_info_ratelimited(
CVP_DBG_TAG "Opening cvp instance: %pK\n", "sess", inst); CVP_DBG_TAG "Opening cvp instance: %pK type %d\n",
"sess", inst, session_type);
mutex_init(&inst->sync_lock); mutex_init(&inst->sync_lock);
mutex_init(&inst->lock); mutex_init(&inst->lock);
spin_lock_init(&inst->event_handler.lock); spin_lock_init(&inst->event_handler.lock);
@@ -385,8 +386,8 @@ int msm_cvp_destroy(struct msm_cvp_inst *inst)
core->synx_ftbl->cvp_sess_deinit_synx(inst); core->synx_ftbl->cvp_sess_deinit_synx(inst);
pr_info_ratelimited( pr_info_ratelimited(
CVP_DBG_TAG "Closed cvp instance: %pK session_id = %d\n", CVP_DBG_TAG "Closed cvp instance: %pK session_id = %d type %d\n",
"sess", inst, hash32_ptr(inst->session)); "sess", inst, hash32_ptr(inst->session), inst->session_type);
inst->session = (void *)0xdeadbeef; inst->session = (void *)0xdeadbeef;
kfree(inst); kfree(inst);
return 0; return 0;

View File

@@ -500,11 +500,8 @@ int cvp_dsp_resume(uint32_t session_flag)
* Probably get rid of this entirely as discussed before * Probably get rid of this entirely as discussed before
*/ */
if (me->state != DSP_SUSPEND) if (me->state != DSP_SUSPEND)
goto exit; dprintk(CVP_WARN, "%s DSP not in SUSPEND state\n", __func__);
me->state = DSP_READY;
exit:
return rc; return rc;
} }