Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions arch/arm64/configs/lineageos_z2_plus_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,12 @@ CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_SDCARD_FS=y
CONFIG_F2FS_FS=y
# CONFIG_F2FS_STAT_FS is not set
# CONFIG_F2FS_FS_POSIX_ACL is not set
CONFIG_F2FS_STAT_FS=y
CONFIG_F2FS_FS_XATTR=y
CONFIG_F2FS_FS_POSIX_ACL=y
CONFIG_F2FS_FS_SECURITY=y
CONFIG_F2FS_FS_ENCRYPTION=y
# CONFIG_F2FS_CHECK_FS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_ECRYPT_FS=y
CONFIG_ECRYPT_FS_MESSAGING=y
CONFIG_NLS_CODEPAGE_437=y
Expand Down
21 changes: 20 additions & 1 deletion drivers/cpufreq/cpufreq_interactive.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/workqueue.h>
#include <linux/kthread.h>
#include <linux/slab.h>
#include <linux/display_state.h>

#define CREATE_TRACE_POINTS
#include <trace/events/cpufreq_interactive.h>
Expand Down Expand Up @@ -88,6 +89,7 @@ static cpumask_t controlled_cpus;
static unsigned int default_target_loads[] = {DEFAULT_TARGET_LOAD};

#define DEFAULT_TIMER_RATE (20 * USEC_PER_MSEC)
#define SCREEN_OFF_TIMER_RATE ((unsigned long) (60 * USEC_PER_MSEC))
#define DEFAULT_ABOVE_HISPEED_DELAY DEFAULT_TIMER_RATE
static unsigned int default_above_hispeed_delay[] = {
DEFAULT_ABOVE_HISPEED_DELAY };
Expand All @@ -113,6 +115,7 @@ struct cpufreq_interactive_tunables {
* The sample rate of the timer used to increase frequency
*/
unsigned long timer_rate;
unsigned long prev_timer_rate;
/*
* Wait this long before raising speed above hispeed, by default a
* single timer interval.
Expand Down Expand Up @@ -479,6 +482,7 @@ static void cpufreq_interactive_timer(unsigned long data)
bool skip_hispeed_logic, skip_min_sample_time;
bool jump_to_max_no_ts = false;
bool jump_to_max = false;
bool display_on = is_display_on();

if (!down_read_trylock(&ppol->enable_sem))
return;
Expand All @@ -497,6 +501,17 @@ static void cpufreq_interactive_timer(unsigned long data)
now = ktime_to_us(ktime_get());
ppol->last_evaluated_jiffy = get_jiffies_64();

if (display_on
&& tunables->timer_rate != tunables->prev_timer_rate)
tunables->timer_rate = tunables->prev_timer_rate;
else if (!display_on
&& tunables->timer_rate != SCREEN_OFF_TIMER_RATE) {
tunables->prev_timer_rate = tunables->timer_rate;
tunables->timer_rate
= max(tunables->timer_rate,
SCREEN_OFF_TIMER_RATE);
}

if (tunables->use_sched_load)
sched_get_cpus_busy(sl, ppol->policy->cpus);
max_cpu = cpumask_first(ppol->policy->cpus);
Expand Down Expand Up @@ -1115,6 +1130,7 @@ static ssize_t store_timer_rate(struct cpufreq_interactive_tunables *tunables,
pr_warn("timer_rate not aligned to jiffy. Rounded up to %lu\n",
val_round);
tunables->timer_rate = val_round;
tunables->prev_timer_rate = val_round;

if (!tunables->use_sched_load)
return count;
Expand All @@ -1123,8 +1139,10 @@ static ssize_t store_timer_rate(struct cpufreq_interactive_tunables *tunables,
if (!per_cpu(polinfo, cpu))
continue;
t = per_cpu(polinfo, cpu)->cached_tunables;
if (t && t->use_sched_load)
if (t && t->use_sched_load) {
t->timer_rate = val_round;
t->prev_timer_rate = val_round;
}
}
set_window_helper(tunables);

Expand Down Expand Up @@ -1570,6 +1588,7 @@ static struct cpufreq_interactive_tunables *alloc_tunable(
tunables->ntarget_loads = ARRAY_SIZE(default_target_loads);
tunables->min_sample_time = DEFAULT_MIN_SAMPLE_TIME;
tunables->timer_rate = DEFAULT_TIMER_RATE;
tunables->prev_timer_rate = DEFAULT_TIMER_RATE;
tunables->boostpulse_duration_val = DEFAULT_MIN_SAMPLE_TIME;
tunables->timer_slack_val = DEFAULT_TIMER_SLACK;

Expand Down
13 changes: 13 additions & 0 deletions drivers/media/platform/msm/vidc/msm_v4l2_vidc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/pm_qos.h>
#include <linux/types.h>
#include <linux/version.h>
#include <linux/io.h>
Expand All @@ -34,6 +35,7 @@

#define BASE_DEVICE_NUMBER 32

static struct pm_qos_request msm_v4l2_vidc_pm_qos_request;
struct msm_vidc_drv *vidc_driver;

uint32_t msm_vidc_pwr_collapse_delay = 2000;
Expand All @@ -60,6 +62,11 @@ static int msm_v4l2_open(struct file *filp)
core->id, vid_dev->type);
return -ENOMEM;
}

dprintk(VIDC_DBG, "pm_qos_add with latency 1000usec\n");
pm_qos_add_request(&msm_v4l2_vidc_pm_qos_request,
PM_QOS_CPU_DMA_LATENCY, 1000);

clear_bit(V4L2_FL_USES_V4L2_FH, &vdev->flags);
filp->private_data = &(vidc_inst->event_handler);
trace_msm_v4l2_vidc_open_end("msm_v4l2_open end");
Expand All @@ -80,6 +87,12 @@ static int msm_v4l2_close(struct file *filp)
"Failed in %s for release output buffers\n", __func__);

rc = msm_vidc_close(vidc_inst);

dprintk(VIDC_DBG, "pm_qos_update and remove\n");
pm_qos_update_request(&msm_v4l2_vidc_pm_qos_request,
PM_QOS_DEFAULT_VALUE);
pm_qos_remove_request(&msm_v4l2_vidc_pm_qos_request);

trace_msm_v4l2_vidc_close_end("msm_v4l2_close end");
return rc;
}
Expand Down
2 changes: 1 addition & 1 deletion mm/vmscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ struct scan_control {
/*
* From 0 .. 100. Higher means more swappy.
*/
int vm_swappiness = 60;
int vm_swappiness = 0;
/*
* The total number of pages which are beyond the high watermark within all
* zones.
Expand Down