From: Maarten Lankhorst <dev@lankhorst.se>
To: intel-xe@lists.freedesktop.org
Cc: Maarten Lankhorst <dev@lankhorst.se>
Subject: [PATCH v2 2/2] drm/xe: Disable display irqs during suspend sequence
Date: Wed, 16 Jul 2025 23:23:18 +0200 [thread overview]
Message-ID: <20250716212318.239017-3-dev@lankhorst.se> (raw)
In-Reply-To: <20250716212318.239017-1-dev@lankhorst.se>
When suspending, we disable the interrupts later than i915, which means
some hotplug may fall through despite flushing. Disable interrupts to
ensure no new failures occur.
The following dmesg happened in kms_cursor_crc@cursor_suspend:
PM: late suspend of devices complete after 16.116 msecs
xe 0000:03:00.0: [drm:intel_power_well_enable [xe]] enabling DC_off
xe 0000:03:00.0: [drm:gen9_set_dc_state.part.0 [xe]] Setting DC state from 4000000b to 00
xe 0000:03:00.0: [drm] *ERROR* DC state mismatch (0x8 -> 0x4000000b)
xe 0000:03:00.0: [drm] *ERROR* Writing dc state to 0xbffffff4 failed, now 0xffffffff
xe 0000:03:00.0: [drm:gen9_set_dc_state.part.0 [xe]] Rewrote dc state to 0xbffffff4 100 times
------------[ cut here ]------------
Missing case (dssm == 3758096384)
WARNING: CPU: 2 PID: 2765 at drivers/gpu/drm/i915/display/intel_cdclk.c:1678 bxt_get_cdclk+0x23c/0x330 [xe]
...
RIP: 0010:bxt_get_cdclk+0x23c/0x330 [xe]
...
Call Trace:
<TASK>
intel_cdclk_get_cdclk+0x12/0x30 [xe]
gen9_disable_dc_states+0xc6/0x270 [xe]
gen9_dc_off_power_well_enable+0xe/0x20 [xe]
intel_power_well_enable+0x5c/0x80 [xe]
intel_power_well_get+0x28/0x40 [xe]
__intel_display_power_get_domain.part.0+0x59/0x90 [xe]
intel_display_power_get+0x49/0x70 [xe]
? __pfx_xelpdp_aux_data_reg+0x10/0x10 [xe]
intel_dp_aux_xfer+0xe7/0x740 [xe]
intel_dp_aux_transfer+0xd4/0x340 [xe]
? usleep_range_state+0x6e/0xe0
? usleep_range_state+0x93/0xe0
drm_dp_dpcd_access+0xc0/0x160 [drm_display_helper]
drm_dp_dpcd_probe+0x3c/0x100 [drm_display_helper]
intel_dp_read_dprx_caps+0x85/0xa0 [xe]
intel_dp_hpd_pulse+0xa9/0x6b0 [xe]
i915_digport_work_func+0x101/0x1b0 [xe]
process_one_work+0x22b/0x6f0
worker_thread+0x1e8/0x3d0
? __pfx_worker_thread+0x10/0x10
kthread+0x11c/0x250
? rt_spin_unlock+0x4a/0xc0
? __pfx_kthread+0x10/0x10
ret_from_fork+0x26c/0x2e0
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1a/0x30
</TASK>
...
---[ end trace 0000000000000000 ]---
Signed-off-by: Maarten Lankhorst <dev@lankhorst.se>
---
drivers/gpu/drm/xe/display/xe_display.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index e2e0771cf2749..bc76a82e59edd 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -33,6 +33,7 @@
#include "intel_hotplug.h"
#include "intel_opregion.h"
#include "skl_watermark.h"
+#include "xe_irq.h"
#include "xe_module.h"
/* Xe device functions */
@@ -338,6 +339,9 @@ void xe_display_pm_suspend(struct xe_device *xe)
intel_display_driver_suspend(display);
}
+ /* Disable and flush display IRQs */
+ xe_display_irq_reset(xe);
+ xe_irq_synchronize(xe);
xe_display_flush_cleanup_work(xe);
intel_hpd_cancel_work(display);
@@ -368,7 +372,10 @@ void xe_display_pm_shutdown(struct xe_device *xe)
intel_display_driver_suspend(display);
}
+ xe_display_irq_reset(xe);
+ xe_irq_synchronize(xe);
xe_display_flush_cleanup_work(xe);
+
intel_dp_mst_suspend(display);
intel_hpd_cancel_work(display);
@@ -459,6 +466,8 @@ void xe_display_pm_resume(struct xe_device *xe)
if (!xe->info.probe_display)
return;
+ xe_display_irq_postinstall(xe, xe_device_get_root_tile(xe)->primary_gt);
+
intel_dmc_resume(display);
if (has_display(xe))
--
2.45.2
next prev parent reply other threads:[~2025-07-16 21:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-16 21:23 [PATCH v2 0/2] drm/xe: Fix hotplug after device suspend Maarten Lankhorst
2025-07-16 21:23 ` [PATCH v2 1/2] drm/xe: Export xe_irq_synchronize and use it in display Maarten Lankhorst
2025-07-16 21:23 ` Maarten Lankhorst [this message]
2025-07-16 22:35 ` ✗ CI.checkpatch: warning for drm/xe: Fix hotplug after device suspend (rev2) Patchwork
2025-07-16 22:37 ` ✓ CI.KUnit: success " Patchwork
2025-07-16 23:34 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-17 22:24 ` ✗ Xe.CI.Full: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250716212318.239017-3-dev@lankhorst.se \
--to=dev@lankhorst.se \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox