107
|
|
|
Seth Forshee |
10 years ago
|
|
|
106
|
|
display: Don't monitor wait_for_fb_{sleep,wake} directly
Now that powerd's entering and exiting of suspend are synchronous wrt the kernel's suspending and resuming of the display device, the display code no longer needs to monitor these files directly. Instead it can just ask whether or not suspend is currently active and expect the display device state to match the system state. Since suspend/resume and display on/off all happen on the mainloop, this is race-free.
The current interfaces are insufficient for what the display code needs to do here, as they reflect the power state visible to the system and this doesn't always match the actual suspend state. Add a new interface, powerd_suspend_active(), to allow the display code to inquire directly about the suspend state. Use this new interface instead of the framebuffer sleep/wake status, and remove monitoring of wait_for_fb_{sleep,wake} in the display code as it is no longer used.
A callback into the display code is also needed to inform it of transitioning out of suspend since the display device may be suspended when a request comes in to turn on the display. Add this callback, which schedules work on the main loop to power on the display if needed, and call it after exiting suspend.
|
Seth Forshee |
10 years ago
|
|
|
105
|
|
|
Seth Forshee |
10 years ago
|
|
|
104
|
|
|
Ricardo Salveti de A... |
10 years ago
|
|
|
103
|
|
|
Automatic PS uploade... |
10 years ago
|
|
|
102
|
|
|
Ricardo Mendoza |
10 years ago
|
|
|
101
|
|
|
Automatic PS uploade... |
10 years ago
|
|
|
100
|
|
|
Ricardo Mendoza |
10 years ago
|
|
|
99
|
|
|
Automatic PS uploade... |
10 years ago
|
|
|
98
|
|
|
Seth Forshee |
10 years ago
|
|
|
97
|
|
|
Automatic PS uploade... |
10 years ago
|
|
|
96
|
|
|
Seth Forshee |
10 years ago
|
|
|
95
|
|
|
Automatic PS uploade... |
10 years ago
|
|
|
94
|
|
|
Ricardo Mendoza |
10 years ago
|
|
|
93
|
|
|
Automatic PS uploade... |
10 years ago
|
|
|
92
|
|
|
Seth Forshee |
10 years ago
|
|
|
91
|
|
|
Automatic PS uploade... |
10 years ago
|
|
|
90
|
|
|
Seth Forshee |
10 years ago
|
|
|
89
|
|
|
Seth Forshee |
10 years ago
|
|
|
88
|
|
|
Automatic PS uploade... |
10 years ago
|
|
|