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

Commit 65bff46d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: Fix incorrect wakelock handling"

parents 0d254b9b 2fe41840
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -3430,8 +3430,11 @@ void ipa_inc_acquire_wakelock(enum ipa_wakelock_ref_client ref_client)
		IPADBG("client enum %d mask already set. ref cnt = %d\n",
		ref_client, ipa_ctx->wakelock_ref_cnt.cnt);
	ipa_ctx->wakelock_ref_cnt.cnt |= (1 << ref_client);
	if (ipa_ctx->wakelock_ref_cnt.cnt)
	if (ipa_ctx->wakelock_ref_cnt.cnt &&
		!ipa_ctx->wakelock_ref_cnt.wakelock_acquired) {
		__pm_stay_awake(&ipa_ctx->w_lock);
		ipa_ctx->wakelock_ref_cnt.wakelock_acquired = true;
	}
	IPADBG_LOW("active wakelock ref cnt = %d client enum %d\n",
		ipa_ctx->wakelock_ref_cnt.cnt, ref_client);
	spin_unlock_irqrestore(&ipa_ctx->wakelock_ref_cnt.spinlock, flags);
@@ -3455,8 +3458,11 @@ void ipa_dec_release_wakelock(enum ipa_wakelock_ref_client ref_client)
	ipa_ctx->wakelock_ref_cnt.cnt &= ~(1 << ref_client);
	IPADBG_LOW("active wakelock ref cnt = %d client enum %d\n",
		ipa_ctx->wakelock_ref_cnt.cnt, ref_client);
	if (ipa_ctx->wakelock_ref_cnt.cnt == 0)
	if (ipa_ctx->wakelock_ref_cnt.cnt == 0 &&
		ipa_ctx->wakelock_ref_cnt.wakelock_acquired) {
		__pm_relax(&ipa_ctx->w_lock);
		ipa_ctx->wakelock_ref_cnt.wakelock_acquired = false;
	}
	spin_unlock_irqrestore(&ipa_ctx->wakelock_ref_cnt.spinlock, flags);
}

+1 −0
Original line number Diff line number Diff line
@@ -837,6 +837,7 @@ struct ipa_active_clients {
struct ipa_wakelock_ref_cnt {
	spinlock_t spinlock;
	u32 cnt;
	bool wakelock_acquired;
};

struct ipa_tag_completion {