Re: [PATCH] media: iris: Unload the firmware before hibernation

From: Kaylin Aurora

Date: Tue Dec 01 2026 - 15:38:07 EST


On Mon, Oct 26, 2026 at 03:39PM +0200, Abel Vesa wrote:
> Make sure the image does not hold an initialized core. Unload the
> firmware before the image is created, and before the kernel that loads
> the image jumps into it, so that the next session loads it again.

Hi Abel,

I tested this on an ASUS Zenbook 14 UX3480QA (X1P42100), on v7.3.6
rather than your base; it applies there with a 4 line offset. The
firmware was loaded (a decode had run) before each sleep, and each
check decodes a short H.264 clip with h264_v4l2m2m and compares the
frames against a software decode.

Without the patch, every resume after a hibernation fails with
"failed to resume" until qcom_iris is reloaded. With it:

- hibernation and restore: decode afterwards is bit-exact, no errors
- hibernation with the decoder open: refused with "cannot hibernate
while the device is open" (-EBUSY), and the decoder works afterwards
- deep suspend: no change, decode afterwards is bit-exact

One problem though. With the patch, hibernation aborted after the
device freeze phase hangs the machine hard: black screen, keyboard
backlight off, only a forced power off recovers. Reproduced twice:

# echo devices > /sys/power/pm_test
# systemctl hibernate

The same sequence with the unpatched driver (firmware also loaded)
comes back after the 5 second wait as expected. Nothing reaches the
log after "PM: hibernation: hibernation entry", and this machine has no
pstore backend, so I don't know where it stops.

As far as I can tell, pm_test=devices only adds the 5 second wait to
the path a real failure takes: when a device fails .freeze after
iris_pm_freeze() has run, create_image() is skipped as well, and
devices go back through .restore without the late and noirq phases.
So I would expect a failed hibernation to hang the same way, though
perhaps less often given the shorter window.

I'm happy to test a v2 or a debug patch on this machine.

Testing done with the help of Claude Opus 5.5.

Kaylin Aurora