Update clock hooks.
Build only himax panel driver.
video: msm: Allow DSI commands to timeout

 * Occasionally the power-off command will timeout even though the panel
   actually powers off. Call wait_for_completion with a timeout instead
   so we don't lock up.

Change-Id: I61f584371e7bb09eac654e1f6cadee5bc7b6e7f9
msm_fb: Display: Fix Dithering issue for rgb565 format

Using RGB888 as source format and rgb565 as destination pixel format,
will cause image corruption on the display. Fix this issue by
setting the destination format as RGB888 in MDP and DSI controller
pixel format as RGB565 for DSI specific panels.

CRs-Fixed: 377484
Change-Id: If58976ee9cd4825efb39437170e54796fa2213e0
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
msm_fb: display: add wait for overlay0 done

Dcs command mode BLT involves both overlay0 done interrupt
and dmap done interrupt. A transaction is start at kickoff and
end with done interrupt.  At some cornor cases both overlay0 and
dmap transaction need to be completed before kickoff new transaction.

Change-Id: I5a3cc6e8255acf2c61fc627d35f990182d226f63
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
(cherry picked from commit 521230e19ad81077bf0ad51ee2989e058e129837)
msm_fb: display: fix the underrun issue when playing interlaced videos

Interlaced videos require higher mdp clk rate and the current code
sets mdp clk to max and return. However mdp clk calculation may still
give a result higher than max mdp clk, for this case the result is
kept and used later to enable blt mode to avoid underrun.

Change-Id: I185d0d15e5b79e94561e790e41713cdb405f8bf4
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm_fb: Keep LCDC timing generator enabled during boot up

Keep the LCDC timing generator enabled during boot up on
MDP 3.03 targets if continuous splash screen feature is enabled.

Change-Id: I64276550f28e1f316c420f9cb158f7b8e938b8ea
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: display: Add timeout for waiting on update

Content Adaptive BackLight userspace algo waits on UPDATE_NOTIFY to
get the screen updates. When turning off CABL, this blocking ioctl
causes the CABL threads to wait until next screen update, which may
take indefinite time.

Add timeout value to the wait_for_completion call, to make ioctl
call blocking for at most timeout value.

CRs-Fixed: 384026
Change-Id: I6715a36020c24ddd09823bd54d4321900429a6b9
Signed-off-by: Kinjal Bhavsar <kbhavsar@codeaurora.org>
video: msm: Fix big scary warning during bootup

 * Don't turn the clocks on until the device is configured.

Change-Id: Ic6d3bfa2ec2bfeb507823a701e09a28333f36440
msm_fb: display: add wait after overlay kickoff

MDP writeback overlay kick off needs to be a blocking call to avoid
WFD tearing issues.

Change-Id: I03ce16b1e11c458bc8602880f22f1aed536a2e5a
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit 7c31ee7933fff437acfaa69cf443c81638a495de)
msm_fb: display: Update mdp clocks based on perf patch

MDP clock was not getting updated to the correct values
causing underrun issues.

Change-Id: I4902ede1a8dda7408384261ca352e1ca1057a69c
Crs-Fixed: 395054, 395166
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm_fb: display: free base layer pipe at adb stop

Base layer pipe need to be freed at adb stop so that same
pipe can be allocated at adb start.

CRs-fixed: 390644
Change-Id: I948bb27687cfe1c96cc3b071b7bb9bb84b2c52c6
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: Handle vsync interrupt properly on MDP 3.03 targets

Handle enabling/disabling the vsync interrupt and mdp clock
enabling/disabling in a better way on MDP 3.03 targets. This
will avoid target crashes due to unclocked register access.

CRs-fixed: 388751
Change-Id: I5c4a409772464ce7d06869374dcba5ad7e335955
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp.c
msm_fb: Make Vsync IOCTL during disable sequence as NO WAIT

Change to make the vsync IOCTL no wait during the disable sequence.
This is to increase the performance. Handle the synchronization of
vsync interrupt using state variables in drivers from now.

(cherry picked from commit 5e0fcdbf8b22bc9637413de9cd0592c159dd4e8f)

Change-Id: I2d861c4ffbea535802860c47e3e9d5a84c9d4956
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Jessica Gonzalez <jgaona@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp_dma.c
	drivers/video/msm/mdp_dma_dsi_video.c
	drivers/video/msm/mdp_dma_lcdc.c
msm_fb: Return pan_display call on Vsync interrupt

Till now, the pan_display call returns on DMA_P_DONE interrupt.
For command mode panels, the DMA transfer starts only after the
DMA engine receives a TE signal from the panel. Hence, return
pan_display ioctl on vsync interrupt to improve performance.
We still wait if the previous DMA transfer is not finished at
the beginning of next pan_display.

(cherry picked from commit 61832135cad75ef082a905fedb30d835c85611b5)

Change-Id: I2eb250c0ba87098424c03fb6ecfffcd1e62ec2c9
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Jessica Goznalez <jgaona@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp.c
	drivers/video/msm/mdp_dma.c
Fix compile.
Revert "video: msm: Allow DSI commands to timeout"

This reverts commit 06292b033550b330958496180a56a9a9a830aa35.
msm_fb: display: Send vsync events using sysfs for MDP4 targets

Replace sending of vsync timestamp using uevents with sysfs entry
as uevent result in increase in power numbers due to broadcast in
nature. Also, for smart panel, wait4vsync is removed.

(cherry picked from commit ca47ab601b9d36b2a96685a6e93042318ebbba8b)

Change-Id: I96577a3408fa0e2e1b54cf97434ddcf75bee589c
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
Signed-off-by: Jessica Gonzalez <jgaona@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_overlay_dsi_cmd.c
	drivers/video/msm/mdp4_overlay_dtv.c
msm_fb: display: Send vsync events using sysfs for MDP3 targets

Replace sending of vsync timestamp using uevents with sysfs entry
as uevent result in increase in power numbers due to broadcast in
nature.

(cherry picked from commit 4ae2fcc7a3e2f1e68efe57ea0a42e7a4b83e87da)

Change-Id: I89bebef35e04c1b5e1e5a56d26482c95f1928b68
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
Signed-off-by: Jessica Gonzalez <jgaona@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp.c
msm_fb: display: turn vsync irq off at suspend

Turn off vsycn irq at suspend to prevent vsync irq firing
before vsycn enabled ioctl called at resume.

Change-Id: I2428cdeb5cf7008e50f6d8dabfad52416db2fff7
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>