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

Commit 42b7e686 authored by Ruofei Ma's avatar Ruofei Ma
Browse files

msm: cvp: Fix DSP ssr handling issue



CVP driver has issue handling a corner case when CVP ssr and DSP ssr
happen very close to each other. Fix it by changing some status setting.

Change-Id: I074a4c0eef7c51d9a113c634f1211e78c48f0bc9
Signed-off-by: default avatarRuofei Ma <ruofeim@codeaurora.org>
parent 1d15dace
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -581,8 +581,10 @@ static int __dsp_shutdown(struct iris_hfi_device *device, u32 flags)
{
	int rc;

	cvp_dsp_set_cvp_ssr();

	if (!(device->dsp_flags & DSP_INIT)) {
		dprintk(CVP_DBG, "%s: dsp not inited\n", __func__);
		dprintk(CVP_WARN, "%s: dsp not inited\n", __func__);
		return 0;
	}

+9 −1
Original line number Diff line number Diff line
@@ -350,6 +350,15 @@ int cvp_dsp_resume(uint32_t session_flag)
	return err;
}

void cvp_dsp_set_cvp_ssr(void)
{
	struct cvp_dsp_apps *me = &gfa_cv;

	mutex_lock(&me->smd_mutex);
	me->cvp_shutdown = STATUS_SSR;
	mutex_unlock(&me->smd_mutex);
}

int cvp_dsp_shutdown(uint32_t session_flag)
{
	struct msm_cvp_core *core;
@@ -377,7 +386,6 @@ int cvp_dsp_shutdown(uint32_t session_flag)
	}

	mutex_lock(&me->smd_mutex);
	me->cvp_shutdown = STATUS_SSR;
	local_cmd_msg.msg_ptr = cmd_msg.msg_ptr;
	local_cmd_msg.msg_ptr_len = cmd_msg.msg_ptr_len;
	mutex_unlock(&me->smd_mutex);
+7 −0
Original line number Diff line number Diff line
@@ -53,6 +53,13 @@ int cvp_dsp_resume(uint32_t session_flag);
 */
int cvp_dsp_shutdown(uint32_t session_flag);

/*
 * API for CVP driver to set CVP status during
 * cvp subsystem error.
 *
 */
void cvp_dsp_set_cvp_ssr(void);

/*
 * API to register iova buffer address with CDSP
 *