]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/pm: Do pci_restore_state() in switcheroo resume hook
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 19 Sep 2025 18:50:13 +0000 (21:50 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 22 Sep 2025 16:34:50 +0000 (19:34 +0300)
Since this switcheroo garbage bypasses all the core pm we
have to manually manage the pci state. To that end add the
missing pci_restore_state() to the switcheroo resume hook.
We already have the pci_save_state() counterpart on the
suspend side.

Arguably none of this code should exist in the driver
in the first place, and instead the entire switcheroo
mechanism should be rewritten and properly integrated into
core pm code...

Reviewed-by: 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-5-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/i915_driver.c

index 327e5fe7dfffc41352768a782bbf9e4bada00b0b..009f4e27cf49b156a5716f6ce5520abea0615801 100644 (file)
@@ -1346,6 +1346,8 @@ int i915_driver_resume_switcheroo(struct drm_i915_private *i915)
        if (ret)
                return ret;
 
+       pci_restore_state(pdev);
+
        ret = i915_drm_resume_early(&i915->drm);
        if (ret)
                return ret;