msm: smd_pkt: Handle wakelocks appropriately to optimize power usage

If the user-space application performs a poll() operation before a
read() operation, then release the wakelock in the read operation.
This is under the assumption that user-space application can grab a
wakelock between poll() and read() operations. If the user-space
application does not perform poll() operation at all before read()
operation, then allow the wakelock to timeout and release itself.

CRs-Fixed: 337654
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
(cherry picked from commit 048ef381aca6b150953a4e6d9b196778589f8e71)

Change-Id: I3cb6e1b06dbb08522dd66dcd8f5cfe4069fefdb1
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>

msm: smd_pkt: Add packet arrival wakelock

While handling the incoming packets from remote subsystems, delay the
system suspension by holding a wakelock with a timeout value of 2 seconds.
This will allow the user-space clients to process the incoming packets
before the system goes to suspend.

(cherry picked from commit c3c5cd93233bccaff0d0230932a5e387ce8dcd4a)

Change-Id: I488f795b76c8aad546a9b14b004d6a59be63b01c
CRs-Fixed: 335782
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Board-shooter: minor memory map revision

*Increased framebuffer size to the same size used when HDMI is enabled (Android 4.2+ probably needs more framebuffer memory)
*Removed HDMI ifdef as the framebuffer size is now the largest size that the ifdef had
*Increased surfaceflinger size (on Android 4.2+, 0x23A0000 may be too small)
*Left a gap between the framebuffer and userspace allocation (gap is 0x1A000)
*Reduced userspace allocation size by 9MB
*Added memory remap history

This revision reduces the size of the userspace allocation by 9MB in exchange for vastly improved stability.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
Revert "shooteru: Import sweep2wake"

This reverts commit 84598ad6cde6d1ff17de003921a51bdb5fff0f5a.
Patch: Linux Kernel to 3.0.100