msm_fb: display: Use spinlock instead of mutex in vsync timer handler

Use spinlock instead of mutex in vsync timer handler to avoid sleeping
from timer context through mutex locks

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
vidc: Map video driver allocated buffers to video smmu

video driver will use the new msm mapped buffer
api's to get kernel virtual and device virtual
address.This change will replace ioremap calls
with new api's.

Signed-off-by: Gopikrishnaiah Anandan <gopikr@codeaurora.org>

Conflicts:

	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_utils.c
	drivers/video/msm/vidc/720p/ddl/vcd_ddl_utils.c
	drivers/video/msm/vidc/common/vcd/vcd_sub.c
vidc: 1080p: Allocate firmware buffer in driver init.

Video core has requirement that firmware buffer address
should be a lesser value than the all other video buffers.
Hence moving allocation to driver init function to
satisfy this requirement.

Signed-off-by: Gopikrishnaiah Anandan <gopikr@codeaurora.org>

Conflicts:

	drivers/video/msm/vidc/1080p/ddl/vcd_ddl.c
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_helper.c
	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c
	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.h
	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker_api.h
msm_fb: display: Enable H/W vsync in msm7x27a

Enable tearing effect control in msm7x27a using gpio.

CRs-Fixed: 289024
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>

Conflicts:

	drivers/video/msm/mipi_dsi.c
	drivers/video/msm/mipi_renesas.c
	drivers/video/msm/mipi_renesas_cmd_fwvga_pt.c
msm_fb: display: add spinlock to synchronize mdp irq enable/disable

To improve performance, UI push thread release mutex before blocked at
waiting for vsync to allow Video thread to be updated at same vsycn.
This also cause contention to enable/disable mdp irq.
Add spinlock to synchronize both threads and irq context.

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

Conflicts:

	drivers/video/msm/mdp4_overlay.c
	drivers/video/msm/mdp4_overlay_dsi_video.c
	drivers/video/msm/mdp4_overlay_lcdc.c
	drivers/video/msm/mdp4_util.c
msm_fb: display: set flush bit at overlay_unset

set flush bit at overlay_unset to notify mdp blending engine to
pick up new configuration changes.

Signed-off-by: KUogee Hiseh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay.c
msm: Remove last references to NPA-related code for AXI rate management

The NPA driver was removed some time ago, but wrapper code
and some of its driver hooks persisted in the tree, despite
not being compiled (or even compilable). Remove these now.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/include/mach/msm_reqs.h
	arch/arm/mach-msm/msm_pm_qos.c
	arch/arm/mach-msm/msm_pm_qos.h
	arch/arm/mach-msm/msm_reqs.c
	drivers/media/video/msm/msm_vfe32.c
	drivers/video/msm/tvenc.c
	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c
vidc: 1080p: Removed check for comparing DPB Size

For best effort decoding we don't need to compare
the available DPB size with the decoded size and
throw error. So, removed the check that compares
them.

CRs-Fixed: 296211
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>

Conflicts:

	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_properties.c
msm_fb: display: Fix writeback offset with correct fbnum

Fix writeback offset with correct fbnum value to avoid any
memory corruption with image buffers in use

CRs-Fixed: 290324
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4.h
msm_fb: display: add 3D support at DSI video mode

Currently, only DSI command mode have 3D capability. Add 3D
support for DSI video mode also.

CRs-fixed: 294082
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_video.c
video: Kconfig: Remove extraneous dots from help text

Clean up the help text by removing extraneous punctuation.

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

Conflicts:

	drivers/video/msm/Kconfig
vidc: Stop using vcodec_axi_a_clk and vcodec_axi_b_clk directly

These two clock are now implicityly enabled and disabled as
dependencies of vcodec_clk (as was already the case for
vcodec_axi_clk).

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>

Conflicts:

	drivers/video/msm/vidc/1080p/resource_tracker/vcd_res_tracker.c
msm_fb: display: Fix 8960 HDMI resolution switch issue

Fix 8960 HDMI resolution switch issue by removing core
reset via clock branches. This helps in retaining the
HDMI PLL register values for subsequent cable
disconnect/connect scenarios.

CRs-Fixed: 296879
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>

Conflicts:

	drivers/video/msm/hdmi_msm.h
	drivers/video/msm/msm_dss_io_8960.c
	drivers/video/msm/msm_dss_io_8x60.c
msm: display: HDMI: ISR not triggered when HPD occurs during power_off

During power off we disable 5v, power down core, by turning off the
TX channels one by one. When a HPD is triggered the driver has a
software debouncing timer during which interrupts are disabled to
be able to read stable HPD status from the register. When HPD is
detected while the core is being turned off/powered down the driver's
software disables the interrupt and this was making the core to go
into off state. So the fix was to keep the interrupt bit enabled through
the register even during the debounce timeout (this doesn't trigger
unnecessary interrupts due to appropriate clearing and masking of HPD
interrupt bits).

Signed-off-by: Manoj Rao <manojraj@codeaurora.org>
msm_fb: display: change mdp clock while mdp is idle

Mdp clock need to be adjusted at run time base on the
performance level. However mdp clock can only be changed
when mdp blending/dma engine is idle.

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

Conflicts:

	drivers/video/msm/mdp4.h
	drivers/video/msm/mdp4_overlay.c
	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
	drivers/video/msm/mdp4_overlay_mddi.c
	drivers/video/msm/mdp4_util.c
msm_fb: display: add ioctl for mixer info

Add new ioctl to allow user to query mdp mixer detail configuration.

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

Conflicts:

	drivers/video/msm/msm_fb.c
	include/linux/msm_mdp.h
vidc: add change to print MFC firmware version

CRs-Fixed: 296531
Signed-off-by: Ananda Kishore <kananda@codeaurora.org>
msm: vidc: Set Y and C size registers to allocated size.

Currently the Y and C sizes are set based on the
size of video being decoded. In case of smooth
streaming, decoded sizes are not the same as allocated
sizes. This change will set the Y and C sizes to
allocated sizes.

Signed-off-by: Deepika Pepakayala <deepikap@codeaurora.org>
vidc: vdec: Pass alignment flag to mapping api's.

Mapping api by default assumes 4K alignment.
Video core requires output buffer to be aligned
to 8K.This change will pass aligment information to
the mapper API.

Signed-off-by: Gopikrishnaiah Anandan <gopikr@codeaurora.org>

Conflicts:

	drivers/video/msm/vidc/common/init/vidc_init.c
msm_fb: display: Use __va instead of ioremap for framebuffer memory map

Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>