On Fri, May 29, 2026 at 02:03:58PM +0300, Jani Nikula wrote: > Add new function intel_display_driver_shutdown_late() to be called > "later" in the struct pci_driver .shutdown hook. > > There's a slight functional change in that > intel_display_driver_shutdown_late() returns early for > !HAS_DISPLAY(). Assume this is what we want, and there are no cases > where display engine is present but all pipes have been fused off. > > Signed-off-by: Jani Nikula <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]> > --- > drivers/gpu/drm/i915/display/intel_display_driver.c | 13 +++++++++++++ > drivers/gpu/drm/i915/display/intel_display_driver.h | 1 + > drivers/gpu/drm/i915/i915_driver.c | 7 ++----- > drivers/gpu/drm/xe/display/xe_display.c | 7 +------ > 4 files changed, 17 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c > b/drivers/gpu/drm/i915/display/intel_display_driver.c > index 7fee9ef88224..7f2d191b9ef0 100644 > --- a/drivers/gpu/drm/i915/display/intel_display_driver.c > +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c > @@ -681,6 +681,19 @@ void intel_display_driver_unregister(struct > intel_display *display) > intel_vga_unregister(display); > } > > +void intel_display_driver_shutdown_late(struct intel_display *display) > +{ > + if (!HAS_DISPLAY(display)) > + return; > + > + /* > + * The only requirement is to reboot with display DC states disabled, > + * for now leaving all display power wells in the INIT power domain > + * enabled. > + */ > + intel_display_power_driver_remove(display); > +} > + > /* > * turn all crtc's off, but do not adjust state > * This has to be paired with a call to intel_modeset_setup_hw_state. > diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h > b/drivers/gpu/drm/i915/display/intel_display_driver.h > index adfde02465ea..61515577758b 100644 > --- a/drivers/gpu/drm/i915/display/intel_display_driver.h > +++ b/drivers/gpu/drm/i915/display/intel_display_driver.h > @@ -24,6 +24,7 @@ void intel_display_driver_remove(struct intel_display > *display); > void intel_display_driver_remove_noirq(struct intel_display *display); > void intel_display_driver_remove_nogem(struct intel_display *display); > void intel_display_driver_unregister(struct intel_display *display); > +void intel_display_driver_shutdown_late(struct intel_display *display); > > int intel_display_driver_pm_suspend(struct intel_display *display); > void intel_display_driver_pm_suspend_late(struct intel_display *display, > bool s2idle); > diff --git a/drivers/gpu/drm/i915/i915_driver.c > b/drivers/gpu/drm/i915/i915_driver.c > index b637c4dedf1b..140c562a8627 100644 > --- a/drivers/gpu/drm/i915/i915_driver.c > +++ b/drivers/gpu/drm/i915/i915_driver.c > @@ -1073,17 +1073,14 @@ void i915_driver_shutdown(struct drm_i915_private > *i915) > i915_gem_suspend(i915); > > /* > - * The only requirement is to reboot with display DC states disabled, > - * for now leaving all display power wells in the INIT power domain > - * enabled. > - * > * TODO: > * - unify the pci_driver::shutdown sequence here with the > * pci_driver.driver.pm.poweroff,poweroff_late sequence. > * - unify the driver remove and system/runtime suspend sequences with > * the above unified shutdown/poweroff sequence. > */ > - intel_display_power_driver_remove(display); > + > + intel_display_driver_shutdown_late(display); > enable_rpm_wakeref_asserts(&i915->runtime_pm); > > intel_runtime_pm_driver_last_release(&i915->runtime_pm); > diff --git a/drivers/gpu/drm/xe/display/xe_display.c > b/drivers/gpu/drm/xe/display/xe_display.c > index e17e05a8854c..fdc999c62bc9 100644 > --- a/drivers/gpu/drm/xe/display/xe_display.c > +++ b/drivers/gpu/drm/xe/display/xe_display.c > @@ -219,12 +219,7 @@ void xe_display_shutdown_late(struct xe_device *xe) > if (!xe->info.probe_display) > return; > > - /* > - * The only requirement is to reboot with display DC states disabled, > - * for now leaving all display power wells in the INIT power domain > - * enabled. > - */ > - intel_display_power_driver_remove(display); > + intel_display_driver_shutdown_late(display); > } > > /* IRQ-related functions */ > -- > 2.47.3 -- Ville Syrjälä Intel
