msm_fb: vsync events for legacy MDP 3.00 targets

Pieced together from current code in CAF. This is very specific to
MDP 3.00 targets that use the LCDC display controller, and it might
break horribly and badly on anything else.

Change-Id: I9d5fd9c47fd5524e8443237a4a4db4d9e9bf27cd
Signed-off-by: Rashed Abdel-Tawab <rashedabdeltawab@gmail.com>
msm_fb: fixup MDP 3.00 vsync events

This is the sum of several fixes and improvements to the MDP 3.00
vsync event code.

Make sure to never switch off MDP command clock twice; add timeout
to the vsync wait completion and interpret the return value of the
completion function correctly.

Change-Id: I4548f8ef9c5e4feba13d7b4a2592e7924f0143ea
Signed-off-by: Rashed Abdel-Tawab <rashedabdeltawab@gmail.com>

Conflicts:
	drivers/video/msm/mdp.c

Change-Id: I92d00ca585f37132d6faf817b1ba488439d4aea4
Revert "msm_fb: fixup MDP 3.00 vsync events"

This reverts commit 548bfc7258f3c0e515b3ce2d9d744e59fa08281f

Change-Id: I4a7ec7b30c8518a31522257a9aac08772e4fe8b6
Revert "msm_fb: vsync events for legacy MDP 3.00 targets"

This reverts commit 726fb0b01ec59ef926c7a98475247f21cf9fa910

Change-Id: I7a35e265f3644e537200d703b57e69ba3d7b6665
Merge "Revert "msm_fb: vsync events for legacy MDP 3.00 targets"" into cm-10.1
Build event debugger as module (to prevent log spam)

Change-Id: Ic7de1bf7a6784624ffc862e59ffb6718a3aa91dd
Revert "Revert "msm_fb: vsync events for legacy MDP 3.00 targets""

This reverts commit f58e69c54a849ee76b7d622d2e043a2d8f0c189f

Change-Id: Id908c2185b7020323739515bb5b3f17a21bf689e
Revert "Revert "msm_fb: fixup MDP 3.00 vsync events""

This reverts commit e7b189c3b4cb2c0788b3064f92e65c489310d543

Change-Id: I8d6b6a9a670bb8324eaa56937c268cc71e8ea4e8
Enable vSync switch in config and enable vSync

Enable switching vSync on and off and enable vSync. Also
essential for Project Butter.

Change-Id: I6f76e072381ff8185a28c39d33910b2542a29c69
Signed-off-by: Rashed Abdel-Tawab <rashedabdeltawab@gmail.com>
Merge branch 'cm-10.1' of https://github.com/androidarmv6/android_kernel_lge_msm7x27-3.0.x into cm-10.1