Skip to content
This repository has been archived by the owner on Sep 9, 2019. It is now read-only.

Commit

Permalink
cpu_input_boost: refactor last input boost event variable name
Browse files Browse the repository at this point in the history
Signed-off-by: kdrag0n <dragon@khronodragon.com>
  • Loading branch information
kdrag0n committed Jan 4, 2019
1 parent 46f057f commit e8702b8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/cpufreq/cpu_input_boost.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/slab.h>
#include "../../kernel/sched/sched.h"

unsigned long last_input_time;
unsigned long last_input_jiffies;

static __read_mostly unsigned int input_boost_freq_lp = CONFIG_INPUT_BOOST_FREQ_LP;
static __read_mostly unsigned int input_boost_freq_hp = CONFIG_INPUT_BOOST_FREQ_PERF;
Expand Down Expand Up @@ -333,7 +333,7 @@ static void cpu_input_boost_input_event(struct input_handle *handle,

queue_work(b->wq, &b->input_boost);

last_input_time = jiffies;
last_input_jiffies = jiffies;
}

static int cpu_input_boost_input_connect(struct input_handler *handler,
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/msm/sde/sde_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3625,7 +3625,7 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
SDE_ATRACE_BEGIN("crtc_commit");

#ifdef CONFIG_CPU_INPUT_BOOST
if (time_before(jiffies, last_input_time + msecs_to_jiffies(5000)))
if (time_before(jiffies, last_input_jiffies + msecs_to_jiffies(5000)))
cpu_input_boost_kick_general(100);
#endif

Expand Down
2 changes: 1 addition & 1 deletion include/linux/cpu_input_boost.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define _CPU_INPUT_BOOST_H_

#ifdef CONFIG_CPU_INPUT_BOOST
extern unsigned long last_input_time;
extern unsigned long last_input_jiffies;

void cpu_input_boost_kick(void);
void cpu_input_boost_kick_max(unsigned int duration_ms);
Expand Down
2 changes: 1 addition & 1 deletion kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,7 @@ long _do_fork(unsigned long clone_flags,
#ifdef CONFIG_CPU_INPUT_BOOST
/* Boost CPU to the max for 1250 ms when userspace launches an app */
if (is_zygote_pid(current->pid) && !state_suspended &&
time_before(jiffies, last_input_time + msecs_to_jiffies(150))) {
time_before(jiffies, last_input_jiffies + msecs_to_jiffies(150))) {
cpu_input_boost_kick_max(1250);
#if defined(CONFIG_CPU_INPUT_BOOST_DEBUG) || defined(CONFIG_DEVFREQ_BOOST_DEBUG)
pr_info("fork: kicked max cpu boost for 1250 ms for app launch\n");
Expand Down

0 comments on commit e8702b8

Please sign in to comment.