Re: [PATCH v4 4/4] media: uvcvideo: defer streaming restart after hibernation snapshot

Oliver Neukum <[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 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.

	Regards
		Oliver
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.