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

Commit 8aff456a authored by Ravinder Konka's avatar Ravinder Konka
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: I658a270d45166b6129771292e87b46078d672963
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 53d2912c
Loading
Loading
Loading
Loading
+21 −9
Original line number Diff line number Diff line
@@ -1774,9 +1774,6 @@ static int ipa3_q6_set_ex_path_dis_agg(void)
*/
int ipa3_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).
	 */
@@ -1802,10 +1799,28 @@ int ipa3_q6_cleanup(void)
		BUG();
	}

	ipa3_ctx->q6_proxy_clk_vote_valid = true;

	return 0;
}

/**
* ipa3_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 ipa3_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 pipe reset
	 * sequence, we have to assert.
	 * In case the uC is not loaded, or upon any failure in the
	 * pipe reset sequence, we have to assert.
	 */
	if (!ipa3_ctx->uc_ctx.uc_loaded) {
		IPAERR("uC is not loaded, can't reset Q6 pipes\n");
@@ -1819,9 +1834,6 @@ int ipa3_q6_cleanup(void)
			if (res)
				BUG();
		}

	ipa3_ctx->q6_proxy_clk_vote_valid = true;

	return 0;
}

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

int ipa3_q6_cleanup(void);
int ipa3_q6_pipe_reset(void);
int ipa3_init_q6_smem(void);

int ipa3_sps_connect_safe(struct sps_pipe *h, struct sps_connect *connect,
+7 −0
Original line number Diff line number Diff line
@@ -2160,6 +2160,13 @@ static int ipa3_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))
				ipa3_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)