msm_fb : Add timeout while waiting for vsync event

Avoid eternal wait for vsync event when client tries to
read the corresponding sysfs entry. This will avoid hangs when
client tries to read in corner cases where the Timing
Generator or the clock or IRQ gets disabled.

CRs-fixed: 406752
Change-Id: I773687220b868823a9e4bfdae74361ee6487c5c6
Signed-off-by: Pradeep Jilagam <pjilagam@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dtv.c

Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb: display: Create sysfs entries in mdp_probe for MDP4 targets

vsync sysfs entries should be created in mdp_probe instead of
creating in panel on. This avoids waiting for the first event
control in framework

Change-Id: I983731481ea89bb7666be5f2a9f75a1e04fd963f
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>

Conflicts:

	drivers/video/msm/mdp4_overlay_dsi_cmd.c
	drivers/video/msm/mdp4_overlay_dtv.c
	drivers/video/msm/msm_fb.h

Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
msm_fb: display: Create sysfs entries in mdp_probe for MDP3 targets

vsync sysfs entries should be created in mdp_probe instead of
creating in panel on. This avoids waiting for the first event
control in framework

Change-Id: I18b05b8d2a65d489afc6e3274ec8dc7a5b9a5f9a
Signed-off-by: Mayank Chopra <makchopra@codeaurora.org>
Merge "msm_fb: Handle vsync interrupt properly on MDP 3.03 targets"
Merge "msm_fb: Return ioctl on vsync interrupt disable"
Merge "msm_fb: Make Vsync IOCTL during disable sequence as NO WAIT"
Merge "msm_fb: Return pan_display call on Vsync interrupt"
Merge "msm_fb: display: Send vsync events using sysfs for MDP3 targets"
Merge "msm_fb: display: Send vsync events using sysfs for MDP4 targets"
Merge "msm_fb: display: Make sysfs read request interruptible"
Merge "msm_fb : Add timeout while waiting for vsync event"
Merge "msm_fb: display: Create sysfs entries in mdp_probe for MDP4 targets"
Merge "msm_fb: display: Create sysfs entries in mdp_probe for MDP3 targets"
msm: kgsl: Add support for Android's sync point

The Android sync point framework will replace the synchronization
previously implemented by genlock. This change implements the KGSL
component of the sync point framework by creating a fence that is
automatically signaled by KGSL when it's timestamp expires. The
fence FD is returned to the user driver so that another process
can wait for the sync point.

Change-Id: Ifee38dfde00e551f3524f7a37833938dcdb64905
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Merge "msm_fb: display: Send current timestamp in case of timeout" into jb_mr1_chocolate
msm: kgsl: implement sync compare callback

The compare callback is required to test the order that
sync pts will signal. Failing to implement the compare
callback results in kernel panics for some use cases.

Change-Id: Ibea1497c12fd8cc66087ff52d3709a07793f215f
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
(cherry picked from commit b44e3b4fb92810703ad296a5c9f829c5f86ffe4a)
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
sync: driver commits

- Revert "base: sync: signal a sync pt when not adding to the
active_list"
- sync: Fix error paths
- sync: add tracepoint support
- sync: refactor sync debug printing
- sync: use proper barriers when waiting indefinitely
- sync: update new fence status with sync_fence_signal_pt
- sync: dump sync state of fence errors
- sync: protect unlocked access to fence status
- base: sync: signal a sync pt when not adding to the active_list
- sync: improve timeout dumps
- sync: use correct signed type when handling SYNC_IOC_WAIT
- sync: dump sync state to console on timeout
- sync: clean up compiler warnings
- sync: fix erase-o in sync_fence_wait
- sync: change wait timeout to mirror poll semantics
- sync: add reference counting to timelines
- sync: add internal refcounting to fences
- sync: optimize fence merges
- sync: reorder sync_fence_release
- sync: export sync API symbols
- sync: allow async waits to be canceled

Change-Id: Id65ecdd395782d487773bdf7baa3ed681a72b729
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
ion: Bring ion header in sync with jb_2.5 userspace [JB_MR1_CHOCOLATE]

Change-Id: I3e5d94dcdb8f56be245c7f6a6d353ef9aa44d93c
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
Adding support for trace events for sync point driver

Change-Id: Icdbe176f1c651e6a0805ef63b9b7f143ab06a350
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
mm: bugfix: set current->reclaim_state to NULL while returning from kswapd()

commit b0a8cc58e6b9aaae3045752059e5e6260c0b94bc upstream.

In kswapd(), set current->reclaim_state to NULL before returning, as
current->reclaim_state holds reference to variable on kswapd()'s stack.

In rare cases, while returning from kswapd() during memory offlining,
__free_slab() and freepages() can access the dangling pointer of
current->reclaim_state.

Signed-off-by: Takamori Yamaguchi <takamori.yamaguchi@jp.sony.com>
Signed-off-by: Aaditya Kumar <aaditya.kumar@ap.sony.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>