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>
Dieser Commit ist enthalten in:
George Shen
2022-07-07 14:05:29 -07:00
committet von Gerrit - the friendly Code Review server
Ursprung 1f62f73764
Commit 98cd09c61f
3 geänderte Dateien mit 7 neuen und 9 gelöschten Zeilen

Datei anzeigen

@@ -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 */
if (!(temp->flags & SESSION_PAUSE)) {
dprintk(CVP_DSP,
"%s: cvp session %x not paused\n",
__func__, hash32_ptr(temp));
"%s: cvp session %x not paused %d\n",
__func__, hash32_ptr(temp), gfa_cv.state);
return -EBUSY;
}
}

Datei anzeigen

@@ -168,7 +168,8 @@ void *msm_cvp_open(int core_id, int session_type)
}
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->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);
pr_info_ratelimited(
CVP_DBG_TAG "Closed cvp instance: %pK session_id = %d\n",
"sess", inst, hash32_ptr(inst->session));
CVP_DBG_TAG "Closed cvp instance: %pK session_id = %d type %d\n",
"sess", inst, hash32_ptr(inst->session), inst->session_type);
inst->session = (void *)0xdeadbeef;
kfree(inst);
return 0;

Datei anzeigen

@@ -500,11 +500,8 @@ int cvp_dsp_resume(uint32_t session_flag)
* Probably get rid of this entirely as discussed before
*/
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;
}