Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc227ed6 authored by George Shen's avatar George Shen
Browse files

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: default avatarGeorge Shen <sqiao@codeaurora.org>
parent c2ac24a1
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
	}

+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ enum dsp_state {
	DSP_PROBED,
	DSP_READY,
	DSP_SUSPEND,
	DSP_INACTIVE,
};

struct msm_cvp_common_data {