]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/pm: Move the hibernate+D3 quirk stuff into noirq() pm hooks
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 19 Sep 2025 18:50:12 +0000 (21:50 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 22 Sep 2025 16:34:48 +0000 (19:34 +0300)
commitf3d8e898ce5e97b2fbc3321b8fbfd31826357f6e
treead6d7690690e6237927d79350af5a3958f6e64a6
parentcead397a976dde554f5bfba48a06f49c29bc3982
drm/i915/pm: Move the hibernate+D3 quirk stuff into noirq() pm hooks

If the driver doesn't call pci_save_state() drivers/pci will
normally save+power manage the device from the _noirq() pm hooks.

We can't let that happen as some old BIOSes fail to hibernate
when the device is in D3. However, we can get very close to
the standard behaviour by doing our explicit pci_save_state()
and pci_set_power_state() stuff from driver provided _noirq()
hooks.

This results in a change of behaviour where we no longer go
into D3 at the end of freeze_late, so when it comes time
to thaw() we'll already be in D0, and thus we can drop the
explicit pci_set_power_state(D0) call.

Presumably switcheroo suspend will want to go into D3 so
call the _noirq() stuff from the switcheroo suspend hook,
and since we dropped the pci_set_power_state(D0) from
resume_early() we'll need to add one back into the
switcheroo resume hook.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250919185015.14561-4-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/i915_driver.c