permission clean-up

Change-Id: I129b3e1bbe5e50ba7f0b5b364b20a1921f138cc4
Soc: msm: Synchronize access to LPA stream

-Synchronize hw_ptr, appl_ptr access between the LPA
  driver and event handler and the ALSA core framework.

 -ported change from compressed driver
  change id I118bfdf4a866cde05d9ebcd21f756da209b69cc5

CRs-Fixed: 511481

Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
Change-Id: I0fe63d8fa4a5372b6c231a5ee44532140cce1301
sync: Fix a race condition between release_obj and print_obj

Before this change, a timeline would only be removed from the timeline
list *after* the sync driver had its release_obj() called. However, the
driver's release_obj() may free resources needed by print_obj().

Although the timeline list is locked when print_obj() is called, it is
not locked when release_obj() is called. If one CPU was in print_obj()
when another was in release_obj(), the print_obj() may make unsafe
accesses.

It is not actually necessary to hold the timeline list lock when calling
release_obj() if the call is made after the timeline is unlinked from
the list, since there is no possibility another thread could be in --
or enter -- print_obj() for that timeline.

This change moves the release_obj() call to after the timeline is
unlinked, preventing the above race from occurring.

Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
Change-Id: I42953704c7a32382fb8529304499088665dbbd33
Input: Propagate hardware event timestamp to evdev.

Convey hardware timestamp associated with the current event packet.
The use of these event codes by hardware drivers is optional.
Used to reduce jitter and improve velocity tracking in ABS_MT devices.

Change-Id: I89f3a958944f6a2979964ee372e61bad448061b6
Signed-off-by: Sasha Levitskiy <sanek@google.com>
msm: kgsl: Avoid turning on GPU clock if already off

In adreno_idle(), check if the GPU clock is already
turned off. If so, the GPU is already idle,
so don't turn on the clocks again.

Change-Id: I27ae939253ee71830466e3117bed0230d7ff67d5
Signed-off-by: Ananta Kishore K <akollipa@codeaurora.org>