msm: cvp: Allow re-send DSP HFI queue after SSR
Add new DSP state, DSP_INACTIVE, to indicate when CPU driver shutdown DSP during SSR. The state helps CPU driver differentiate DSP state between initial CVP boot up vs CVP restarted. Change-Id: I0fd03efcecfceb38716b254a6725fb67bb969806 Signed-off-by: George Shen <sqiao@codeaurora.org>
This commit is contained in:
parent
c2ac24a1a9
commit
dc227ed603
@ -287,12 +287,13 @@ int cvp_dsp_shutdown(uint32_t session_flag)
|
||||
if (me->state == DSP_INVALID)
|
||||
goto exit;
|
||||
|
||||
me->state = DSP_UNINIT;
|
||||
me->state = DSP_INACTIVE;
|
||||
rc = cvp_dsp_send_cmd_sync(&cmd, sizeof(struct cvp_dsp_cmd_msg));
|
||||
if (rc) {
|
||||
dprintk(CVP_ERR,
|
||||
"%s: cvp_dsp_send_cmd failed with rc = %d\n",
|
||||
__func__, rc);
|
||||
cvp_hyp_assign_from_dsp();
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@ -425,7 +426,7 @@ void cvp_dsp_send_hfi_queue(void)
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (me->state != DSP_PROBED)
|
||||
if (me->state != DSP_PROBED && me->state != DSP_INACTIVE)
|
||||
goto exit;
|
||||
|
||||
rc = cvp_hyp_assign_to_dsp(addr, size);
|
||||
@ -440,7 +441,6 @@ void cvp_dsp_send_hfi_queue(void)
|
||||
dprintk(CVP_WARN, "%s: Send HFI Queue failed rc = %d\n",
|
||||
__func__, rc);
|
||||
|
||||
rc = cvp_hyp_assign_from_dsp();
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,7 @@ enum dsp_state {
|
||||
DSP_PROBED,
|
||||
DSP_READY,
|
||||
DSP_SUSPEND,
|
||||
DSP_INACTIVE,
|
||||
};
|
||||
|
||||
struct msm_cvp_common_data {
|
||||
|
Loading…
Reference in New Issue
Block a user