]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/{i915,xe}/display: Block hpd during suspend
authorDibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
Thu, 24 Jul 2025 08:39:27 +0000 (14:09 +0530)
committerImre Deak <imre.deak@intel.com>
Mon, 4 Aug 2025 11:34:52 +0000 (14:34 +0300)
commit6e2c8fbc66a002c90bf9aa217ec2ffb52b027154
tree67d742b064774768fdb998c6064a78a0b8372335
parent7b4106517fe651fdb4dd3a0c341a68e9c63d85dd
drm/{i915,xe}/display: Block hpd during suspend

It has been observed that during `xe_display_pm_suspend()` execution,
an HPD interrupt can still be triggered, resulting in `dig_port_work`
being scheduled. The issue arises when this work executes after
`xe_display_pm_suspend_late()`, by which time the display is fully
suspended.

This can lead to errors such as "DC state mismatch", as the dig_port
work accesses display resources that are no longer available or
powered.

To address this, introduce  'intel_encoder_block_all_hpds' and
'intel_encoder_unblock_all_hpds' functions, which iterate over all
encoders and block/unblock HPD respectively.

These are used to:
- Block HPD IRQs before calling 'intel_hpd_cancel_work' in suspend
  and shutdown
- Unblock HPD IRQs after 'intel_hpd_init' in resume

This will prevent 'dig_port_work' being scheduled during display
suspend.

Continuation of previous patch discussion:
https://patchwork.freedesktop.org/patch/663964/

Changes in v2:
 - Add 'intel_encoder_block_all_hpds' to 'xe_display_pm_shutdown'.(Imre
   Deak)
 - Add 'intel_hpd_cancel_work' to 'xe_display_fini_early' to cancel
   any HPD pending work at late driver removal. (Imre Deak)

Changes in v3:
 - Move 'intel_encoder_block_all_hpds' after intel_dp_mst_suspend
   in 'xe_display_pm_shutdown'.(Imre Deak)

Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://lore.kernel.org/r/20250724083928.2298199-1-dibin.moolakadan.subrahmanian@intel.com
drivers/gpu/drm/i915/display/intel_encoder.c
drivers/gpu/drm/i915/display/intel_encoder.h
drivers/gpu/drm/i915/display/intel_hotplug.c
drivers/gpu/drm/xe/display/xe_display.c