audio: fix audio_mvs wakelock

Change-Id: Ib2c7572d2f4c83f4ee3832bced903163ec5000a0
Revert "audio: fix audio_mvs wakelock"

This reverts commit e47294ed83f24a5f2fac0e3f350091cbffc0d07a.
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: Fix error in y-offset check logic in FB driver

After 4 KB alignment changes, the frame from 3rd buffer doesn't
get updated since during PUT_VSCREEN_INFO ioctl, the driver
returns -1 to userspace due to error in logic because the hole
size is not considered in calculating the logic for validity of
the y-offset. Change fixes this error.

CRs-fixed: 325134
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit d37b52404236bf4cadf530a238cafc5d6499d32a)

Change-Id: Ifccfa25a37fe0f8d86bf5b822d9affe7fa41203a
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: Clean up the fix for error in y-offset check in FB driver

There is a failure observed in yres_virtual offset check and every
third frame gets skipped without an error message. Due to this high
fps is noticed in the test applications. Correct the yres_virtual
offset check.

CRs-fixed: 325134
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit 2bd101d5bed1729b317114456360605e86289c15)

Change-Id: I35af570df2d6d2609562203f30f3caa1506b9b1d
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: display: fix division-by-zero bug

Panel v_back_porch could be zero for virtual panels, so the check for
zero is added to fix the bug.

Change-Id: I6a29f3d8d771092bca2374cc9a1c11dd77ad569e
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm: display: fb blend setting via MSMFB_METADATA_SET ioctl

MSMFB_METADATA_SET ioctl is added for the fb user to pass
in additional infomation rather than using reserved
fields.
User can set pre-multiplied alpha for the frame buffer via this
ioctl, overlay blend setting will take this into account.

Change-Id: Ic2f6236d84691fb03174ec479874c6928489ea30
Signed-off-by: Ken Zhang <kenz@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/mdp4_util.c
	drivers/video/msm/msm_fb.c
Revert "msm_fb: display: Attach and detach MDP IOMMU on suspend/resume"

This reverts commit 0ffdb09c5b079558df4af22e7d89403ed43f9bb6.

Change-Id: Ib899b768d96c90a4cf41d9e7a86ba1a5647ad69d
msm_fb: display: Increase MDP IOMMU buffer mapping size

Double the MDP IOMMU buffer mapping size to allow overfetching
by hardware for boundary conditions and avoid system crashes
due to page faults.

CRs-Fixed: 378108
CRs-Fixed: 364478
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ib19af6b06ab06455acaffcca33830e0487bb0836
(cherry picked from commit 1ed0dae869f6384d23322b78691852d70c573174)
video: msm: Workaround an MDP crash on 8660

 * If an impossibly high clock rate is needed while composing with MDP,
   the hardware will lock up when BLT mode is used.
 * Reproducible on the Galaxy Note by long-pressing power while the
   camera preview is running.
 * Just fail the overlay set so that userspace switches to GPU.

Change-Id: I2a69f967efb90a08efaadbe2d13584ca450f9805
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>
error commit

Change-Id: I0cb3e5528d6717e5c3fbfdfe6ae774c434bd4ba2
Revert "error commit"

This reverts commit b0a35ccf43504200f07eddda47e63fdc9ff9741e.
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_dsi_video.c
	drivers/video/msm/mdp4_overlay_dtv.c
	drivers/video/msm/mdp4_overlay_lcdc.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>
msm_fb : display : Block RGB downscale in MDP 4.0 and 4.1

Downscale is not allowed on RGB pipes in MDP 4.0 and 4.1. Hence,
fail the OVERLAY_SET ioctl for such configurations.

Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
(cherry picked from commit 3545573720822ce97ec37586f10fdf74a6d4f090)

Change-Id: I8445c18ac21cb7322eb9eb4c802623df5da07eb7
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
msm_fb: display: Add pseudo-planar 422 H1V2 support in the MDP4

Rotator outputs pseudo-planar 422 H1V2 for interleaved inputs
on 90 degree rotation. Add changes to support MDP_Y_CRCB_H1V2
in MDP4.

CRs-Fixed: 371303
Change-Id: I8083bf44f9e2addf9e8732268147c1c3f6c0e2af
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb: display: remove extra dmap irq disable

Both irq enable and disable need to be called symmetrically.
Remove an extra dmap irq disable call.

Change-Id: Ic51003c50431ebe46a9fc540163cda77a1c91797
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: add pipe commit ioctl

currently, pan display serves as pipe commit. However it
may spend long time pending on cosole_lock() which cause
flickering on HDMI. Add pipe commit ioctl to allow commit
from overlay in addition to pan_display.

CRs-fixed: 391564
Change-Id: I163b5d96f727b70b4d5693e9a414b59339818998
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dtv.c
msm_fb: display: empty pending queue during suspend

Overlay_play() adds a pipe into pending queue and pan_display()
will commit those pipes to hardware and empty queue. This patch
will make sure queue is empty at suspend so that no unexpected
pipes will be commited to hardware by pan_display() at resume.
Otherwise, iommu page fault may happen.

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