msm_fb: display: set max clk level when more than 2 pipes used

Correct logic to take all pipes into account and increase clk perf level
to max when more than 2 pipes are used.

Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
(cherry picked from commit 38eac1aef2250181f1a2f9d75529f0961257740b)

Conflicts:

	drivers/video/msm/mdp4_overlay.c

Change-Id: I23dfa549f21c5c5f7b66d5514ba58972bb608851
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm: wfd: Adds writeback start/stop functionality.

Removes register/unregister calls and replaces them
with start/stop. No need to pre-register the buffers
anymore.

Change-Id: I2f12c3a5791252ad09032cc628d93fb1dc50fee0
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: add mdp overlay1 writeback

This feature is enabled to avoid underrun on the display external
interface (HDMI). For example, if 1080p to 720p downscaling is
required, and mdp clk rate already is in its max, writeback is the
only solution for this situation.

Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit 0da46929eb69a01fa4b1d26a317e8fcc60a024ac)

Conflicts:

	drivers/video/msm/mdp4_overlay_dtv.c

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dtv.c

Change-Id: I5dd62a2722a29600f1e15b353f90614df17dbfcf
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>
msm_fb: display: add overlay1 writeback enable and disable

This logic is used to enable mdp overlay1 writeback mode when
downscaling in any pipe for mixer1 requires a mdp clk rate more than
its max, and disable it when no pipe requires more than max mdp clk
rate.

Change-Id: I1fcf5d50604f3fa5986d230c4d2b324586bc5197
CRs-fixed: 330895
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
Signed-off-by: Ronny Schmatzler <schmatzler@googlemail.com>