Re: [PATCH v4 4/4] media: uvcvideo: defer streaming restart after hibernation snapshot
Alan Stern <[email protected]>
| Newsgroups | org.kernel.vger.linux-pm,org.kernel.vger.linux-kernel,org.kernel.vger.linux-media,org.kernel.vger.linux-usb |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 29, 2026 at 04:43:44PM +0200, Oliver Neukum wrote: > On 29.07.26 16:08, Alan Stern wrote: > > > You're missing an important fact: If something goes wrong during the > > hibernation transition (for example, if the kernel's memory image can't > > be stored to disk) then there will be no RESTORE phase. Following the > > THAW phase, the system will return to normal operation. > > Right, but that does not need to mean that the driver has to be operational > at the THAW phase. It has to be operational before userland is unfrozen > again at the latest. The difficulty how the driver learns that the system > will not power down remains to be solved. > > For this reason, during THAW drivers must not assume that the system is > > about to power down. > > True. For this reason the patch introduces a notifier queue. > > Now, that you make me think about that it seems to be inelegant, as this throws > away the proper order of the device tree. It seems to me that we should > bite the bullet and go for the big solution: > > Split the THAW phase in two, like a THAW_WRITEOUT and an optional > THAW_BAILOUT that is called only when the system does not power down. I could think up some better names for it. Also, it doesn't fit into the existing scheme of callbacks, whereby each "suspend"-type callback has a corresponding "resume"-type callback. The new one you're proposing would be something different -- a "stay-alive" callback, neither suspend nor resume. Alan Stern