msm: mdss: fix issue of overlapping BW for two adjacent surfaces

Current code detects two adjacent surfaces as if those were overlapping,
this can impact by increasing the bandwidth calculations in this scenario.
These changes correct the algorithm to avoid the overlap in boundaries
that are only adjacent.

Change-Id: Iee43c1662c90c38dbff03991ee93884ef444fb19
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
msm: mdss: add bandwidth check while performing frame level checks

Add frame level check inside overlay prepare API, for the bandwidth that
would be required by MDP to display the frame. If the bandwidth is over
the defined limits, then we need to fail the configuration to allow an
alternative composition configuration to happen instead.

Change-Id: I7721047589ce9239f1fb63c37ca5d97127c90f7e
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Saurabh Shah <saurshah@codeaurora.org>
msm: mdss: add bandwidth check function

Add function which calculates the bandwidth that would be required by
MDP to display the frame. If the bandwidth is over the defined limits,
an error is returned which means the configuration is not acceptable and
may lead to display underruns.

Change-Id: I991ac458d347487c5c634d271814222aa661fd58
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>