msm_fb: Use an exclusive semaphore for Vsync IOCTL

Vsync IOCTL runs in a separate thread context and is independent of the
other display IOCTLs. Right now, we have the same semaphore shared
for Vsync IOCTL along with other IOCTLs. This will cause performance
drop if a Vsync enable/disable IOCTL thread waits to acquire the
semaphore since composition might be happening through Overlay/Blit
IOCTL. Hence, use a different semaphore for the Vsync IOCTL.

Change-Id: I190505740b289b01812b2a46d237854a31d047e8
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
video: msm: Call unblank for DTV too

Change-Id: I73345a1b096812eafd03a2da84933fd7bb3ead12
msm_fb: display: Assign proper destination rectangles to mdp blit

Add check for (90 + Flip Horizontal) and Flip Vertical cases to assign
proper destination rectangle parameters to avoid corrupted frame
buffer content.

CRs-Fixed: 344807
Change-Id: I7e7b0b8d26f08f63a6f9c55eedd37f31cf0348d7
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
msm_fb: Check for panel power on after Unblank.

In Overlay_play , panel power on check was at wrong place
it has to be after Unblank.

Change-Id: If910f83ef57499b5f771bc7d3d1bdfa814d5c019
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
msm: display: update non-double-buffered register

Update non-double-buffered register to avoid flickering
or mdp hang in engine done interrupt.

Change-Id: I71e8c6e587bcf2f5eca504d884e20dd224776311
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Sakshi Sharma <sakshis@codeaurora.org>
qt602240_ts: clear unused slots in the framework after calibration

It is possible for the state of the framework and the driver to get out
of sync resulting in "stuck" touch points from the framework's perspective.
This seems to happen only if there are touches during the device's
calibration.  The result is a locked up touchscreen for the user.

After error cases and after calibration, send an "unused" message
(-1 for ABS_MT_TRACKING_ID) for all unused slots. This fixes the
phantom stuck points.

Change-Id: I1fc22175dde9deb68ac69c322e305fc174fdba78
qt602240_ts: fix incorrect #if !defined(CONFIG_*_MODEL) usage

  * When trying to avoid compiling some code for a specified set of models,
    #if !defined() was used with ||'s instead of &&'s. This ends up enabling the
    code on all models, which is not the intended purpose.
  * #demorganfail

Change-Id: If42c933ae144f8c3b7c64cd5a8da36ac418a6efc
qt602240_ts: add additional mutex protection

Change-Id: I174920431e0eaba2b59dda78e478af228affb9d7