mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 23:23:53 +02:00
port from msm: 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. |
||
|---|---|---|
| .. | ||
| block_io.c | ||
| console.c | ||
| consoleearlysuspend.c | ||
| earlysuspend.c | ||
| fbearlysuspend.c | ||
| hibernate.c | ||
| Kconfig | ||
| main.c | ||
| Makefile | ||
| power.h | ||
| poweroff.c | ||
| process.c | ||
| snapshot.c | ||
| suspend_test.c | ||
| suspend_time.c | ||
| suspend.c | ||
| swap.c | ||
| user.c | ||
| userwakelock.c | ||
| wakelock.c | ||