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

Commit a45accb1 authored by Sivan Reinstein's avatar Sivan Reinstein Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: Move q6 pipe reset to AFTER_SHUTDOWN



Move q6 pipes reset to after receiving AFTER_SHUDOWN
notification from SSR as doing it in BEFORE_SHUTDOWN
can result in pipes not being empty.

Change-Id: I3f193ddfaaa928de547a2e94744da99fcb1b972a
Acked-by: default avatarChaitanya Pratapa <cpratapa@qti.qualcomm.com>
Acked-by: default avatarDavid Arinzon <darinzon@qti.qualcomm.com>
Signed-off-by: default avatarRavinder Konka <rkonka@codeaurora.org>
Signed-off-by: default avatarSivan Reinstein <sivanr@codeaurora.org>
parent ed85703d
Loading
Loading
Loading
Loading
+18 −6
Original line number Diff line number Diff line
@@ -1614,9 +1614,6 @@ static int ipa_q6_set_ex_path_dis_agg(void)
*/
int ipa_q6_cleanup(void)
{
	int client_idx;
	int res;

	/* If uC has notified the APPS upon a ZIP engine error,
	 * APPS need to assert (This is a non recoverable error).
	 */
@@ -1642,6 +1639,23 @@ int ipa_q6_cleanup(void)
		BUG();
	}

	ipa_ctx->q6_proxy_clk_vote_valid = true;
	return 0;
}

/**
* ipa_q6_pipe_reset() - A cleanup for the Q6 pipes
*                    in IPA HW. This is performed in case of SSR.
*
* Return codes:
* 0: success
* This is a mandatory procedure, in case one of the steps fails, the
* AP needs to restart.
*/
int ipa_q6_pipe_reset(void)
{
	int client_idx;
	int res;
	/*
	 * Q6 relies on the AP to reset all Q6 IPA pipes.
	 * In case the uC is not loaded, or upon any failure in the
@@ -1659,8 +1673,6 @@ int ipa_q6_cleanup(void)
			if (res)
				BUG();
		}

	ipa_ctx->q6_proxy_clk_vote_valid = true;
	return 0;
}

+1 −0
Original line number Diff line number Diff line
@@ -1552,6 +1552,7 @@ int ipa_tag_process(struct ipa_desc *desc, int num_descs,
		    unsigned long timeout);

int ipa_q6_cleanup(void);
int ipa_q6_pipe_reset(void);
int ipa_init_q6_smem(void);

int ipa_sps_connect_safe(struct sps_pipe *h, struct sps_connect *connect,
+7 −0
Original line number Diff line number Diff line
@@ -2172,6 +2172,13 @@ static int ssr_notifier_cb(struct notifier_block *this,
			pr_info("IPA BEFORE_SHUTDOWN handling is complete\n");
			return NOTIFY_DONE;
		}
		if (SUBSYS_AFTER_SHUTDOWN == code) {
			pr_info("IPA received MPSS AFTER_SHUTDOWN\n");
			if (atomic_read(&is_ssr))
				ipa_q6_pipe_reset();
			pr_info("IPA AFTER_SHUTDOWN handling is complete\n");
			return NOTIFY_DONE;
		}
		if (SUBSYS_AFTER_POWERUP == code) {
			pr_info("IPA received MPSS AFTER_POWERUP\n");
			if (!atomic_read(&is_initialized)