kernel: Hack to load mismatch module version

Signed-off-by: neobuddy89 <neobuddy89@gmail.com>
msm: kgsl: Delay the first devfreq status read

No reason to read status when there hasn't been any activity
yet.  Wait at least one sample period after the GPU has been
turned on before pinging devfreq to read status.

Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
PM / devfreq: Rewrite devfreq_update_status() to fix multiple bugs

The current devfreq_update_status() has the following bugs:
- When the new frequency doesn't have a valid level, the time spent in the
  new frequency is counted towards the next valid frequency switch instead
  of being ignored.
- The time spent on the previous frequency is added to the new frequency's
  stats instead of the previous frequency's stats.

This patch fixes all of this.

Signed-off-by: Saravana Kannan <skannan@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
PM / devfreq: Check for GPU busy time before sending the sample

Sometimes GPU busy time is very low during sampling. Accumulate
the statistics and send them with the next sample.

Signed-off-by: Suman Tatiraju <sumant@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
defconfig
remove fauxs sync shit
Added fsync on/off support.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Blechd0se <alex.christ@hotmail.de>
fs: sync: enable fsync by default.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Blechd0se <alex.christ@hotmail.de>
fs: sync: add missing return if fsync is disabled from userspace.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Blechd0se <alex.christ@hotmail.de>
defconfig
purge intelliplug
arm: add own hotplug driver

Simple SMP hotplug driver, based on @franciscofranco implementation.

For now without the suspend/resume logic, since this needs
to be redone.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
hotplug: delete deprecated earlysuspend handler

There is no proper support of earlysuspend in this kernel,
so better delete this stuff until there is a better option
available.
Also adjusting a few tunables.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
hotplug: add tunable sysfs entries

Allowing to change the current sampling_rate as well
as the first threshold (single core) and second threshold
(all cores).
Actual path will be: /sys/kernel/hotplug_control

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
hotplug: remove single_core_load and all_core_load

Those sysfs caused instability, which is something i don't want.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
hotplug: delay initial workqueue start

By delaying it a bit, we workaround some kind of
race condition. Enabling effectively four cores
during boot might be a good idea anyway.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
hotplug: fix core 4 would eventually not go down

We only check if our current cpu is online, not thinking about
which position it might be currently. This would result in a very
long uptime for the fourth cpu even when there is zero load.

The solution is actually pretty simple; we just check every case
and offline accordingly to that. Also reducing the overhead of the
driver a bit and cleaning up unneeded stuff.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
hotplug: add back suspend/resume logic

Using @faux123 powersuspend driver here to get the same
functionality like with androids earlysuspend handlers.

This will effectively turn all cpus (except 0) off during
screen off and turn on the second cpu when screen is on
again.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
hotplug: add sysfs for first threshold

And doing some random cleanups.

Signed-off-by: Blechd0se <alex.christ@hotmail.de>
hotplug: add simple debug option

Signed-off-by: Blechd0se <alex.christ@hotmail.de>