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>