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>