Hi all, This mail is used to discuss the motivation on moving power key handling from Gaia to Gecko (according to Bug 898707). Please refer to the link as below for what I mentioned here.
https://docs.google.com/a/mozilla.com/drawings/d/1nT0WOW-Xgxp0oNzgRx7BOdxMBrDKf0cxDVfLXMeziA8/edit The blue/pink/purple arrows are used to indicate flows of handling power key between kernel driver, gecko and gaia. And only blue arrows are protected by WakeLock. So there may be a chance that kernel will go back to suspend state before FxOS finished to process the power key then change power state from 3 -> 0. "In order to avoid this issue, we should guarantee that whole flows of power key handling are protected by WakeLock." But you can see the flows now it goes through layers between Gaia & Gecko, that is hard to protect by WakeLock. So I proposed to move power key handling from Gaia to Gecko as well as the idle timer management. Then it becomes more easy to deal with this issue and process power more quickly and in time (ex: race condition between power key & idle timer). Why does current other devices didn't have this issue? Because there is a WakeLock with N second timeout requested from kernel when every time device is woken up from suspend state. That wakelock with timeout covered the time for power key handling. But actually it introduced more power consumption when device is woken up by the reason which didn't need to bring the power state back to 0. Ex: network signal strength change or network status change. Please give some feedback for this. Thanks, Sincerely yours. ------------------------------------- Marco Chen Engineering Manager System Team, Device Engineering Mozilla Taiwan Tel: +886-2-87861100 # 352 mail: [email protected] _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
