msm: mdss: update watermark level programming for macrotile formats

Fetch and store logic for macrotile format is different than linear
format. Update watermark level programming to accommodate these
differences

Change-Id: Id0810bd1e56f9fca00de94f933c9e2db6dead83c
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: mdss: reduce mdp bandwidth for single pipe use case

For single layer use case, mdp prefill bandwidth request can be
reduced because mdp pipe operates like a fifo and there is no need to
fill all buffers before the active region.

Change-Id: Ic087f394b2551658543cff7f99789eace0388e07
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: mdss: add bandwidth check per pipe

Add check to verify that the bandwidth of a pipe does not exceed
the threshold per pipe. The check happens during the overlay setup
and if the pipe exceed the limit, the driver will try to decimate to
reduce the bandwidth; but even if after decimation the limit is
exceeded, it will fail the configuration.

Change-Id: I7ad3654126a503e41540fca250276d564aecccdd
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: mdss: remove additional vert decimation when per pipe BW exceeds

Currently if per pipe BW exceeds pre-defined limit, we add additional
vertical decimation to reduce BW. But this has inverse effect on quality.
To mitigate this issue, decimate further only if user has already
requested decimation else return an appropriate error which user can
detect and act upon it.

CRs-Fixed: 637971
Change-Id: I1c3b913036b7a1680d6c99b03d42f1204f71f89f
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: mdss: Tune watermark and prefill BW based on minimum SMP bytes

Modify watermark levels and prefill BW calculation
to be set based on the minimum prefill buffer bytes from
the SMP. Add debugfs property to dynamically tune the minimum
bytes for debugging

Change-Id: I3af1e3468eaab56d3a8eea5fe456d7af547d3244
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: mdss: Fix potential stack corruption issue

Fix potential stack corruption issue which is possible
due to different datatype for arguments used in callee
and caller function.

Change-Id: I564f62af7574c8eaa3ac8f55de0f0732223cae42
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: fix checkpatch warnings

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
mako_hotplug: we can shift left here instead.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Revert "ARM: 7494/1: use generic termios.h"

This reverts commit 9e51d16d3dbdce1bfebd07de8b351c037e57d573.
Revert "lib/lzo: huge LZO decompression speedup on ARM by using unaligned access"

This reverts commit 367e0ae961616f9cf89d9d1b5d399395e45f4e39.
Revert "arm: compile with the generic rwsem"

This reverts commit 722c5832cd7d33af9054cc2411ba32723212c81b.
mako_hotplug: fix a bug where all cores could stay indefinitely online if userspace (either root command or an app) onlined all cores when the counter was < 10. Fix it by querying the num_online_cpus() every sample (100ms).

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Revert "msm: mdss: Fix potential stack corruption issue"

This reverts commit 9d8bf5601e60394992b58869aeb860ab121da09d.
Revert "msm: mdss: Tune watermark and prefill BW based on minimum SMP bytes"

This reverts commit cb2472e5b3261ab5d8a5bf1dc01a0bdba7676f68.
Revert "msm: mdss: remove additional vert decimation when per pipe BW exceeds"

This reverts commit 923b2f53576ecb827a74dbee267766aaed82e203.
iRevert "msm: mdss: add bandwidth check per pipe"

This reverts commit 7908f92f2379207eaa97ef8c9961a84a7b508608.
Revert "msm: mdss: reduce mdp bandwidth for single pipe use case"

This reverts commit e84919e47844e0cdc3090412f982382466f3bab4.
Revert "msm: mdss: update watermark level programming for macrotile formats"

This reverts commit 2c7b4458160eb01b4ea998273cdb46720c9be232.
msm8974: Stop breaking the whole system

 * Deep breath............

   .....

 * Carveout allocations must be inside a memory { } stanza.

Change-Id: Ica240acec74acfd2180182d7a2725889452af5f6
Headset: Ability to hang-up a call from a wired audio headset

Address OPO_52.
The KEY_MEDIA and KEY_VOLUMEUP are mapped to multiple buttons.
That will confuse the input class driver when one button is
pressed while others are released. Fuse all buttons with same
function to one will fix the problem.

Change-Id: Ife63602e68d0fad2813821f0c7e0b6d78cc5d878