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

Commit 977be972 authored by c_mtharu's avatar c_mtharu
Browse files

msm: adsprpc: remove PM vote counter in fastrpc driver



Remove PM vote counter in the fastrpc driver as the system wakeup
events framework will keep track of CPU awake and relax votes from
a specific client and handle it accordingly.

Change-Id: I827eeffe3aabddbf983ba60e79925febe9410f00
Acked-by: default avatarThyagarajan Venkatanarayanan <venkatan@qti.qualcomm.com>
Signed-off-by: default avatarc_mtharu <mtharu@codeaurora.org>
parent 19a9ab9f
Loading
Loading
Loading
Loading
+3 −15
Original line number Diff line number Diff line
@@ -371,7 +371,6 @@ struct fastrpc_apps {
	/* Unique job id for each message */
	uint64_t jobid[NUM_CHANNELS];
	struct wakeup_source *wake_source;
	unsigned int wake_count;
};

struct fastrpc_mmap {
@@ -2060,14 +2059,9 @@ static inline void fastrpc_pm_awake(int fl_wake_enable, bool *pm_awake_voted)
{
	struct fastrpc_apps *me = &gfa;

	if (!fl_wake_enable)
	if (!fl_wake_enable || *pm_awake_voted)
		return;

	spin_lock(&me->hlock);
	if (!me->wake_count)
	__pm_stay_awake(me->wake_source);
	me->wake_count++;
	spin_unlock(&me->hlock);
	*pm_awake_voted = true;
}

@@ -2077,13 +2071,7 @@ static inline void fastrpc_pm_relax(bool *pm_awake_voted)

	if (!(*pm_awake_voted))
		return;

	spin_lock(&me->hlock);
	if (me->wake_count)
		me->wake_count--;
	if (!me->wake_count)
	__pm_relax(me->wake_source);
	spin_unlock(&me->hlock);
	*pm_awake_voted = false;
}