Muhammad Usama Anjun's recent series for being able to cancel the hibernate sequence [1] exposes a bug with amdgpu handling for skipping the thaw step.
Because the thaw step is skipped in most cases, cancelling the hibernate means that the device is left in an inconsistent state. Add support to the PM core to let a driver track it's frozen state when an error code is returned during thaw(). This will ensure that the poweroff() and restore() callbacks get run. changes since RFC: * Drop first patch * Introduce is_frozen Cc: Muhammad Usama Anjum <[email protected]> Mario Limonciello (AMD) (2): PM: Allow device drivers to manage the frozen state of a device drm/amd: Manage frozen state internally Documentation/driver-api/pm/devices.rst | 8 ++++++++ drivers/base/power/main.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++++++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- include/linux/pm.h | 3 +++ 5 files changed, 27 insertions(+), 1 deletion(-) -- 2.51.0
