msm: mdss: Add missing BL lock around BL-related info

The bl_updated variable requires the BL lock. Otherwise, it can be
corrupted and cause backlight issues.

Change-Id: I55eb4b8d525765ede4f27a404f5c3f1f0b446719
Signed-off-by: Benet Clark <benetc@codeaurora.org>

Conflicts:

	drivers/video/msm/mdss/mdss_mdp_splash_logo.c

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: mdss: control backlight level during blank and unblank events

Add code to set the backlight level to zero for blank event
and restore the backlight level to its previous value during
unblank event. This will fix any unexpected panel flicker
that might show up on the screen during panel ON sequence.

CRs-Fixed: 608091
Change-Id: I871a067b0cc40d893b8b7e5a25103ebb914f9b7a
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
arm: mach-msm: Remove the unused rmt_storage code

The rmt_storage module is no longer used.
Remove the unused module and cleanup the makefile and kconfig.

CRs-Fixed: 549951
Change-Id: Ie9ebaa2209ea9fa0df05dc892504fcb882f00f29
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/Makefile
cpufreq: cpu-boost: Implement additional checks

* Return early without calculations if last
  input_boost_work is pending.
* Disable input boost if input_boost_freq value is
  less than or equal to min possible frequency.
* Disable hotplug boost if plug_boost_freq value is
  less than or equal to min possible frequency.
* When we check for current frequency greater than
  boost frequency, also check if boost is removed
  properly or not. If not, do so.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: cpu-boost: Unify input and hotplug boost

* This doesn't make sense to have mirror functions
  operating different boost frequencies.
* If input_boost_freq > hotplug_boost_freq, hotplug
  boost will be rendered useless in most case since
  parallel input boost will be doing it work.
* So instead having separate boost functions,
  keep only single boost function "do_input_boost"
  and let hotplug callback access this boost.
* Disable hotplug boost by default and provide
  attribute for same.

* Increased migration_load_threshold to prevent
  not-so-needed and recurring migrations.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:

	drivers/cpufreq/cpu-boost.c
cpufreq: cpu-boost: Do not consider keypad events for boost

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: cpuboost: Switch to CAF version

* This change is under review.
* CAF version uses thread structure  for thread migration.
* Remove additional checks.
* After testing, unified hotplug boost is working great,
  so enable by default.
* Load based sync is enabled by default as well.
* Add debug prints to let devs debug and check.
* CAF default for migration threshold is 15 which seems
  way small, use 30 instead.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:

	drivers/cpufreq/cpu-boost.c
cpufreq: cpuboost: Sanity optimization for hotplug boost

* Don't check if hotplug_boost is enabled for every event.
  We need to check same only when CPU_ONLINE event occurs.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
makefile: refresh default toolchain
debug: remove: arm unwind: remove logspam while in debug mode

authored on 3 Nov 2013 by cyanogen
mm: slub: Default slub_max_order to 0

To avoid locking and per-cpu overhead, SLUB optimisically uses
high-order allocations up to order-3 by default and falls back to
lower allocations if they fail. While care is taken that the caller
and kswapd take no unusual steps in response to this, there are
further consequences like shrinkers who have to free more objects to
release any memory. There is anecdotal evidence that significant time
is being spent looping in shrinkers with insufficient progress being
made (https://lkml.org/lkml/2011/4/28/361) and keeping kswapd awake.

SLUB is now the default allocator and some bug reports have been
pinned down to SLUB using high orders during operations like
copying large amounts of data. SLUBs use of high-orders benefits
applications that are sized to memory appropriately but this does not
necessarily apply to large file servers or desktops.  This patch
causes SLUB to use order-0 pages like SLAB does by default.
There is further evidence that this keeps kswapd's usage lower
(https://lkml.org/lkml/2011/5/10/383).

Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: flar2 <asegaert@gmail.com>
staging: logger: Allow to completely disable

* Logger is completely disabled on kernel_common branch.
* Let's disable it via userspace and give option to
  user to re-enable it when required.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:

	drivers/staging/android/logger.c
ARM: dts: msm: increase adsp heap size for msm8974

For hevc hybrid codec, adsp heap size needs to be increased to
64MB to support 1080p video.

Change-Id: I3812cc2f0204f18fbade9ae41d8e784909055569
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Signed-off-by: flar2 <asegaert@gmail.com>
net: loopback: set default mtu to 64K

loopback current mtu of 16436 bytes allows no more than 3 MSS TCP
segments per frame, or 48 Kbytes. Changing mtu to 64K allows TCP
stack to build large frames and significantly reduces stack overhead.

Performance boost on bulk TCP transferts can be up to 30 %, partly
because we now have one ACK message for two 64KB segments, and a lower
probability of hitting /proc/sys/net/ipv4/tcp_reordering default limit.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: flar2 <asegaert@gmail.com>
arm/dt: msm8974: Increase "ib" values for VIDC DDR bandwidth request

As per the recommendation by performance team, update the
"ib" values for DDR BW requests. This change fixes the
display under-runs seen during video playback.

Change-Id: I137814c82b257b8c751dab9df4f705e43fd5643e
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Signed-off-by: flar2 <asegaert@gmail.com>
msm: Fix high load average from uninterruptible waits (@cyanogen)

Signed-off-by: flar2 <asegaert@gmail.com>
Add backlight dimmer option

This is based on n5dim by @mzhou  https://github.com/mzhou/n5dim

Signed-off-by: flar2 <asegaert@gmail.com>
More gradual levels for backlight dimmer mod (based on @mzhou module)

Signed-off-by: flar2 <asegaert@gmail.com>
Backlight dimmer mod: more gradual transitions

Signed-off-by: flar2 <asegaert@gmail.com>
backlight: fix a bug where the screen would be completely dark or near darkness with backlight_dimmer enabled when the display dimmed. The brightness level can't be any lower than dev->min_brightness and previous code allowed that to happen, so fix it.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: flar2 <asegaert@gmail.com>