From: Imre Deak <[email protected]> A pending hotplug work or the encoder suspend/shutdown hooks may still require display IRQs at least for AUX accesses, so keep all display IRQs except for hotplug IRQs enabled until after intel_hpd_cancel_work() and the encoder suspend/shutdown hooks are called during system suspend and shutdown.
Signed-off-by: Imre Deak <[email protected]> Signed-off-by: Jani Nikula <[email protected]> --- drivers/gpu/drm/i915/i915_driver.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 58081b52461a..93940cfe91a0 100644 --- a/drivers/gpu/drm/i915/i915_driver.c +++ b/drivers/gpu/drm/i915/i915_driver.c @@ -1055,7 +1055,8 @@ void i915_driver_shutdown(struct drm_i915_private *i915) intel_dp_mst_suspend(display); - intel_irq_suspend(i915); + intel_encoder_block_all_hpds(display); + intel_hpd_cancel_work(display); if (intel_display_device_present(display)) @@ -1064,6 +1065,8 @@ void i915_driver_shutdown(struct drm_i915_private *i915) intel_encoder_suspend_all(display); intel_encoder_shutdown_all(display); + intel_irq_suspend(i915); + intel_dmc_suspend(display); i915_gem_suspend(i915); @@ -1135,7 +1138,8 @@ static int i915_drm_suspend(struct drm_device *dev) intel_display_driver_suspend(display); - intel_irq_suspend(dev_priv); + intel_encoder_block_all_hpds(display); + intel_hpd_cancel_work(display); if (intel_display_device_present(display)) @@ -1143,6 +1147,8 @@ static int i915_drm_suspend(struct drm_device *dev) intel_encoder_suspend_all(display); + intel_irq_suspend(dev_priv); + /* Must be called before GGTT is suspended. */ intel_dpt_suspend(display); i915_ggtt_suspend(to_gt(dev_priv)->ggtt); @@ -1314,6 +1320,8 @@ static int i915_drm_resume(struct drm_device *dev) intel_hpd_init(display); + intel_encoder_unblock_all_hpds(display); + intel_display_driver_resume(display); if (intel_display_device_present(display)) { -- 2.47.3
