[PATCH v5 4/4] media: uvcvideo: skip post-snapshot hibernation THAW

From: Haowen Tu

Date: Wed Sep 02 2026 - 22:21:14 EST


When a UVC camera is streaming and the system enters hibernation, the
streaming interface is frozen before the snapshot is created. The
original kernel then resumes devices with PMSG_THAW so it can write the
hibernation image.

The UVC streaming interface is not needed for image writeout. Mark it
with DPM_FLAG_SKIP_HIBERNATION_THAW so the PM core can leave it
suspended during the post-snapshot THAW phase. This avoids restarting
the streaming hardware and turning the camera indicator LED back on while
the image is being written.

If the original kernel continues running instead of powering down, the PM
core resumes devices skipped this way before userspace is thawed.

Signed-off-by: Haowen Tu <tuhaowen@xxxxxxxxxxxxx>
---
drivers/media/usb/uvc/uvc_driver.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 31b4ac3b48c1..d44c17c99daf 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -559,6 +559,7 @@ static int uvc_parse_streaming(struct uvc_device *dev,
intf->altsetting[0].desc.bInterfaceNumber);
return -EINVAL;
}
+ dev_pm_set_driver_flags(&intf->dev, DPM_FLAG_SKIP_HIBERNATION_THAW);

streaming = uvc_stream_new(dev, intf);
if (streaming == NULL) {
--
2.20.1