ONDEMAND: Improve Input Boost whe using Smart Up.
Clean removed OWNER_SPIN check from mutex.c
Do not use DWC3_PROPRIETARY_CHARGER flag by default.

This brake some chargers, but when ON can allow other chargers!

so i will add STweaks controls for this. ON/OFF
msm: hotplug: Refactor load calculation

* Move core load calculations to this file and optimize.
* Calculate load based on current policy->max, not cpuinfo.max_freq
  which explains the strange 78% maximum load value before.
* Recalculate thresholds and fast_lane_load accordingly.
* Cleanup some ambiguous namings and other minor stuff.
* EXPORT_SYMBOL_* is useless for static functions.
msm: hotplug: Allow to disable the circular stats buffer

This option reduces latency a tiny bit more.
msm: rq_stats: Calculate load based on current freq limit

We are not using rq_stats any more so this commit is just for the
sake of completeness.  Prior to this patch, load has been calculated
based on an initial value of policy.cpuinfo.max_freq. This value may
change for several reasons: userspace settings, thermal throttling
(hello hammerhead!) or extended frequency tables where the absolute
maximum level is often not used during regular operations. This
results in unreliable calculations. Consider current policy.max to
fix this behaviour.
msm: hotplug: Simplify store_history_size()
cpufreq: interactive: Move definition of cpufreq_gov_interactive downwards

This moves definition of cpufreq_gov_interactive towards the bottom of file, so
that we don't have to add prototype of cpufreq_governor_interactive() in the
beginning of file.

Change-Id: I04bd1004954eb36502c5cd7e35d3d7274cddaf95
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Git-commit: e50d640cacfe61e69f1b4fa92fa0174c688e919c
Git-Repo: https://android.googlesource.com/kernel/common.git
[junjiew@codeaurora.org: Resolve merge conflicts]
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
cpufreq: interactive: fix compiling warnings

The gcc warns like:

  cpufreq_interactive.c:745:6: warning: operation on 'ret' may be undefined [-Wsequence-point]

It was introduced by commit cf0fad49d17cb8273ce555dd5b7afab67d7923bf.

Since sprintf(...) just return 1 (one character) in this case, ret should not changed.
Just discarding the result of sprintf(...) leads to the result that
the committer of cf0fad49d17cb8273ce555dd5b7afab67d7923bf wants.

Change-Id: Ifed1cef6d6a31c3ed23dad03a567b3b9eddf3a57
Signed-off-by: Chih-Wei Huang <cwhuang@android-x86.org>
Git-commit: 0715d10b9e6c04327adb189e13ecd6a3c2df48ce
Git-Repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
cpufreq: interactive: fix compiling warnings
MSM HotPlug: Adapt to my tree.
MSM HotPlug: Allow to use 1 core boost. (disable the tweaks) to save PWR.
MSM HotPlug: correct cpu_load_data, prev_cpu_* to u64
Add Support for F320 Korean LG G2 Device. thanks to mankindtw@xda
alucard_hotplug: Reset up_rate for cpu0.
msm: kgsl: inherit owner from kgsl/proc debug directory

Make all entries under kgsl/proc inherit its owner's uid/gid.

[ccross]
Reapplied after it was overwritten by another patch.

Bug: 10550827
Big: 10954149

Signed-off-by: Rom Lemarchand <romlem@google.com>
Signed-off-by: Colin Cross <ccross@google.com>
msm: kgsl: Treat 0x0 as valid GPU pagetable physical address

Iommu driver could be allocating a valid GPU pagetable at
physical address 0x0, remove assumption from GPU kernel driver
that 0x0 is invalid pagetable address.

Change-Id: I213c0fbc1d90a13bef83c7d7589ad9e5729771fd
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Disabled CLOCK DEBUG, all the same non stop logs on deep sleep...
WARN ONCE when ktime_get requested during suspend. less warn logs.

something in LG low power code in mach-msm asking for ktime_get during
suspend, and that generate warm log in dmesg

Started with KK source kernel.

<6>PM: suspend of devices complete after 49.435 msecs
<6>PM: late suspend of devices complete after 1.686 msecs
<6>PM: noirq suspend of devices complete after 4.286 msecs
<4>Disabling non-boot CPUs ...
<6>CPU0: msm_cpu_pm_enter_sleep mode:3
<4>------------[ cut here ]------------
<4>WARNING: at kernel/time/timekeeping.c:266 ktime_get+0x13c/0x144()
<4>Modules linked in: exfat
<4>[<c010ce40>] (unwind_backtrace+0x0/0x104) from [<c0194580>] (warn_slowpath_common+0x60/0x80)
<4>[<c0194580>] (warn_slowpath_common+0x60/0x80) from [<c0194654>] (warn_slowpath_null+0x1c/0x24)
<4>[<c0194654>] (warn_slowpath_null+0x1c/0x24) from [<c01d5e4c>] (ktime_get+0x13c/0x144)
<4>[<c01d5e4c>] (ktime_get+0x13c/0x144) from [<c011d3b0>] (hfpll_enable+0xdc/0x1b0)
<4>[<c011d3b0>] (hfpll_enable+0xdc/0x1b0) from [<c011d6bc>] (set_speed+0x94/0xe0)
<4>[<c011d6bc>] (set_speed+0x94/0xe0) from [<c011d928>] (acpuclk_krait_set_rate+0x220/0x640)
<4>[<c011d928>] (acpuclk_krait_set_rate+0x220/0x640) from [<c016f2f8>] (msm_pm_power_collapse+0x1d0/0x2b0)
<4>[<c016f2f8>] (msm_pm_power_collapse+0x1d0/0x2b0) from [<c017038c>] (msm_cpu_pm_enter_sleep+0x60/0x110)
<4>[<c017038c>] (msm_cpu_pm_enter_sleep+0x60/0x110) from [<c017381c>] (lpm_enter_low_power.constprop.7+0x294/0x684)
<4>[<c017381c>] (lpm_enter_low_power.constprop.7+0x294/0x684) from [<c0173dcc>] (lpm_suspend_enter+0x70/0x90)
<4>[<c0173dcc>] (lpm_suspend_enter+0x70/0x90) from [<c01d4540>] (suspend_devices_and_enter+0x284/0x33c)
<4>[<c01d4540>] (suspend_devices_and_enter+0x284/0x33c) from [<c01d47e0>] (pm_suspend+0x1e8/0x25c)
<4>[<c01d47e0>] (pm_suspend+0x1e8/0x25c) from [<c01d4d20>] (try_to_suspend+0xa4/0xb8)
<4>[<c01d4d20>] (try_to_suspend+0xa4/0xb8) from [<c01ac0c8>] (process_one_work+0x208/0x43c)
<4>[<c01ac0c8>] (process_one_work+0x208/0x43c) from [<c01acbd4>] (worker_thread+0x19c/0x4d4)
<4>[<c01acbd4>] (worker_thread+0x19c/0x4d4) from [<c01b1268>] (kthread+0xbc/0xc0)
<4>[<c01b1268>] (kthread+0xbc/0xc0) from [<c0107230>] (kernel_thread_exit+0x0/0x8)
<4>---[ end trace 95520f758af144db ]---
<4>msm_gpio_show_resume_irq: 315 triggered
<4>gic_show_resume_irq: 200 triggered
<4>gic_show_resume_irq: 203 triggered
<4>gic_show_resume_irq: 240 triggered
<6>PM: noirq resume of devices complete after 3.051 msecs
<3>lge_touch 2-0020: lge_touch touch suspended. try i2c operation after 10ms.
<6>PM: early resume of devices complete after 1.250 msecs
alucard_hotplug: optimization.