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

Commit 0ef671a2 authored by Aman Mehta's avatar Aman Mehta Committed by Gerrit - the friendly Code Review server
Browse files

msm-perf: Removed game active status node



Removed the support for game status node to specifically compare
for gfx events, the same is archived with checking the value of pid.
This saves an extra fops on each iteration for game on and off.

Rejecting events with timestamp = 0.

Change-Id: Icbafc4d1f8fa1e444b9074fcf2fde47a6e85d609
Signed-off-by: default avatarAman Mehta <amanmeht@codeaurora.org>
parent 74d363db
Loading
Loading
Loading
Loading
+1 −27
Original line number Diff line number Diff line
@@ -106,7 +106,6 @@ static bool max_cap_cpus[NR_CPUS];
static cpumask_var_t limit_mask_min;
static cpumask_var_t limit_mask_max;

static atomic_t game_status;
static atomic_t game_status_pid;

static bool ready_for_freq_updates;
@@ -884,8 +883,7 @@ void msm_perf_events_update(enum evt_update_t update_typ,
	if (update_typ != MSM_PERF_GFX)
		return;

	if (!atomic_read(&game_status) ||
	(pid != atomic_read(&game_status_pid)))
	if (pid != atomic_read(&game_status_pid) || (timestamp == 0))
		return;

	spin_lock_irqsave(&gfx_circ_buff_lock, flags);
@@ -903,30 +901,6 @@ void msm_perf_events_update(enum evt_update_t update_typ,
}



static int set_game_start_event(const char *buf, const struct kernel_param *kp)
{
	long usr_val = 0;
	int ret = strlen(buf);

	kstrtol(buf, 0, &usr_val);
	atomic_set(&game_status, usr_val);
	return ret;
}

static int get_game_start_event(char *buf, const struct kernel_param *kp)
{
	long usr_val  = atomic_read(&game_status);

	return scnprintf(buf, PAGE_SIZE, "%ld\n", usr_val);
}

static const struct kernel_param_ops param_ops_game_start_evt = {
	.set = set_game_start_event,
	.get = get_game_start_event,
};
module_param_cb(evnt_gplaf_status, &param_ops_game_start_evt, NULL, 0644);

static int set_game_start_pid(const char *buf, const struct kernel_param *kp)
{
	long usr_val = 0;