mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
1ae5815864
This fixes the issue where LCD takes a long time to come back up since the execution of backlight on and late_resume works by the suspend worker thread is delayed due to one (or more) of the sys_sync calls in early_suspend and suspend paths taking a long time (sometimes 15sec or more) for the below reported scenario(s): Scenario 1 (copy with usb connected): 1. plug usb 2. adb shell 3. busybox cp /sdcard/file1 /sdcard/file2 (copy >= 100MB file1 in sdcard/emmc to file2 in sdcard/emmc) 4. press end key to suspend 5. press end key again and it takes a long time for LCD to come back up Scenario 2 (background copy): 1. plug usb 2. adb shell 3. busybox cp /sdcard/file1 /sdcard/file2 & (copy >= 100MB file1 in sdcard/emmc to file2 in sdcard/emmc) 4. disconnect usb 5. press end key to suspend 6. press end key again and it takes a long time for LCD to come back up A more common form of Scenario 2 is for the user to just use the copy function on the UI to copy large file(s). We address this by moving sys_sync calls to a separate workqueue and having a timeout polling based mechanism to bail out of suspend in case of user invoking a wakeup event (like end key press) while we are waiting for the sys_sync completion at the synchronization point in suspend worker thread context. CRs-Fixed: 283994 Change-Id: I6b54af8432e58fd5442817b7388ce2e0b83354b6 Signed-off-by: Pratik Patel <pratikp@codeaurora.org> (cherry picked from commit 8564b5ebeafa2be276e0004d7d32bd101642fb3d) Conflicts: kernel/power/process.c |
||
---|---|---|
.. | ||
block_io.c | ||
console.c | ||
consoleearlysuspend.c | ||
earlysuspend.c | ||
fbearlysuspend.c | ||
hibernate.c | ||
Kconfig | ||
main.c | ||
Makefile | ||
power.h | ||
poweroff.c | ||
process.c | ||
qos.c | ||
snapshot.c | ||
suspend.c | ||
suspend_test.c | ||
swap.c | ||
user.c | ||
userwakelock.c | ||
wakelock.c |