diff --git a/arch/arm64/configs/lineageos_z2_plus_defconfig b/arch/arm64/configs/lineageos_z2_plus_defconfig index 5714a82b3230..3154bd853bdc 100644 --- a/arch/arm64/configs/lineageos_z2_plus_defconfig +++ b/arch/arm64/configs/lineageos_z2_plus_defconfig @@ -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 diff --git a/drivers/cpufreq/cpufreq_interactive.c b/drivers/cpufreq/cpufreq_interactive.c index 789a131fec7a..09a3dcf39fb1 100644 --- a/drivers/cpufreq/cpufreq_interactive.c +++ b/drivers/cpufreq/cpufreq_interactive.c @@ -31,6 +31,7 @@ #include #include #include +#include #define CREATE_TRACE_POINTS #include @@ -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 }; @@ -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. @@ -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; @@ -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); @@ -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; @@ -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); @@ -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; diff --git a/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c b/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c index 9d6f325d5a36..5da45d9a331e 100644 --- a/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c +++ b/drivers/media/platform/msm/vidc/msm_v4l2_vidc.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -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; @@ -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"); @@ -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; } diff --git a/mm/vmscan.c b/mm/vmscan.c index fc1c933b73d3..7527c584e917 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -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.