msm_fb: display: add mdp clock control to histogram enable/disable

Add mdp clock control to histogram enable and disable block to
prevent system from crashing when accessing register with mdp
clocks off.

Change-Id: Ide808b332b5456f3fc639fcbb0d03d5cad0e387f
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: restore previous mdp bandwidth when resume

mdp resume bandwidth is set to the value when device was suspend, so
that the correct init value is set to avoid underrun.

CRs-fixed: 425823
Change-Id: Ie9b832f0eb5b5e1b6cb5e8979626986d896d340b
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: display: check bus scale handler for registration

mdp bus client could be registered multiple times without the check.

Change-Id: I582741c75e815873357e62bc9bf0ff61a4cecf9f
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: display: Add alpha enable check in blend

FIR and M/N scalar when used for downscaling, drops
alpha channel of the given layer. To notify this, alpha_drop flag
is updated accordingly. This flag need not be checked for layers
with no alpha plane. In some scenarios alpha_drop may get enabled
for the layers with no alpha plane and cause issues realted to blend
composition of layers. Check for setting alpha_drop only if source
ayer has alpha plane.

Change-Id: Ie64b30c045a78d0d68eb9efacc76902afae7850d
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
video: msm: Enable pixel repeat in X direction

Change-Id: I788ad04703699c043e86d01ebf23251c410b78f7
msm: display: Fix blend configuration for video layer with MDP composition

With video layer in MDP composition, there is no need to apply destination
over blend rule, as z-order of layers take care of proper staging of layers
by default. Apply constant blend to the video layer when in MDP composition

CRs-fixed: 437965
Change-Id: I7476659f12cdf06018bf6ace829a836c86ae97e8
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb:display: correct bus bw for downscale case

The check condition for updating bus bandwidth if downscaling is
needed was always FALSE.

Change-Id: Iec0a4d13c7737d86976d76e0dfd3ec45062799fd
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: display: remove old code fragment from mdp4_overlay.c
msm_fb: display: force mdp clock off at suspend

At suspend, turn off mdp related clocks off if clocks
are not turned off by vsync disable request.

Change-Id: I0949b00b9ee0aee05b9b553ac7318b647052d94d
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 780557dc178fc5511f4c03b4840791d27499a5f6)
video: msm: Add missing perf update in pipe commit

Change-Id: I3905693444b21afc5b88b1b121ef9de4919f3f3f

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_video.c
msm_fb: display: add mdp new update method

Enable new mdp update method which requires flush bit
to be set before updating mixer cfg register for both
smart and dump panel

Change-Id: I97b9d221da574a96707748ec83dd1acff6dcb654
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: fix typo in mipi_dsi_host.c
msm: smsm: Add support for SMSM interrupt mask

When a remote processor changes its SMSM state, it compares the change
against the notification mask and sends a notification to the remote
processor if needed.  Traditionally, Apps has set all interrupt flags to
enabled, so it is woken up and interrupted for all state changes.

With the recent addition of the SMSM callback notifiers, we can start
setting the mask based upon the callbacks.

CRs-Fixed: 347968
Change-Id: I84c06a00db5857d847ae318290df13babf317869
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/smd.c
[moto] arch/arm/mach-msm/smd changes

Change-Id: I7eb8c20ecedd3b12c5696733e10243ae226ba2d0
drivers/video/msm: add esc_byte_ratio pinfo for smd panels

Change-Id: I8fa86353c3aad9607c981481dd19dd125ac0755f
msm_serial_hs_lite: Ignore break/error characters in RX queue

Disallow break/framing error characters from entering the
UARTDM RX queue, since this may stall the TX path and
prevent further console messages from being printed.

Change-Id: Ibe20d834978f78e64dcb6abb3d39499e8f8176c6
CRs-Fixed: 359256
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
msm_serial_hs_lite: Read back the NCF register after writing

The UARTDM core requires that the NCF value be read back
after being written to avoid data from being dropped from
the TX queue.

Change-Id: Ia8e9c85982d032ff5b1ca95d2a78c9827a8cbe37
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
msm_serial_hs_lite: Refactor wait_for_xmitr

Remove the second argument to wait_for_xmitr in preparation
for further refactoring of the console code, and because
all call sites wait for the same status bit.

Change-Id: I1688e2bc5048439a98dda7550b43ceaaaa84d437
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
msm_serial_hs_lite: Check SR[TXEMT] in wait_for_xmitr

Use SR[TXEMT] in addition to ISR[TX_READY] when determining
whether new data can be transmitted to work around a
condition where ISR[TX_READY] may not always give an
accurate indication of the state of the queue.

Change-Id: Ia3a590a485647a005c7c019660f11566208c2667
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
msm_serial_hs_lite: Write NCF when initializing the console

The console TX path does not write NCF until after TX_READY
is asserted, meaning that the wait_for_xmitr path could be
polling on a ready bit dictated by the last NCF value set
by the bootloader.

Change-Id: I6d7c9c2610e67d5d84dd2e9b84ee29f94ba4d180
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>