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. Cc: Muhammad Usama Anjum <[email protected]> I suggest this patch series merge through linux-pm. v2: * pick up tag * rebase on linux-pm/bleeding-edge * fix lkp robot issue 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 | 7 +++++++ 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, 29 insertions(+), 1 deletion(-) -- 2.43.0
