Sfoglia il codice sorgente

msm: ipa3: Increment ipa clock count once enable clock complete

In apps resume scenario if start channel not saving IPA registers,
as ipa clock count was not updated. Adding changes to increment clock
count once clock enable success before reg save.

Change-Id: Ie179bfe648373dad0148c65a11f03945292911f5
Signed-off-by: Ashok Vuyyuru <[email protected]>
Ashok Vuyyuru 3 anni fa
parent
commit
aed6bbb321
1 ha cambiato i file con 10 aggiunte e 1 eliminazioni
  1. 10 1
      drivers/platform/msm/ipa/ipa_v3/ipa.c

+ 10 - 1
drivers/platform/msm/ipa/ipa_v3/ipa.c

@@ -7191,12 +7191,21 @@ static int ipa3_panic_notifier(struct notifier_block *this,
 	/* Make sure IPA clock voted when collecting the reg dump */
 	IPA_ACTIVE_CLIENTS_PREP_SPECIAL(log_info, "PANIC_VOTE");
 	res = ipa3_inc_client_enable_clks_no_block(&log_info);
-	if (res) {
+	if (!ipa3_active_clks_status()) {
 		IPAERR("IPA clk off not saving the IPA registers\n");
 	} else {
+		/*make sure clock won't disable in middle of save reg*/
+		if (res) {
+			IPADBG("IPA resume in progress increment clinet cnt\n");
+			atomic_inc(&ipa3_ctx->ipa3_active_clients.cnt);
+		}
 		ipa_save_registers();
 		ipahal_print_all_regs(false);
 		ipa_wigig_save_regs();
+		if (res) {
+			IPADBG("IPA resume in progress decrement clinet cnt\n");
+			atomic_dec(&ipa3_ctx->ipa3_active_clients.cnt);
+		}
 	}
 
 	ipa3_active_clients_log_print_table(active_clients_table_buf,