From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org,
"Jani Nikula" <jani.nikula@intel.com>,
"Jouni Högander" <jouni.hogander@intel.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>
Subject: [PATCH v3 2/7] drm/xe: Clear xe->display when no longer valid
Date: Thu, 16 Apr 2026 00:04:06 +0300 [thread overview]
Message-ID: <20260415210411.24750-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260415210411.24750-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Don't leave a stale xe->display pointer hanging around after
the display driver has been torn down.
While xe shouldn't hit the display reset related issue that
affects i915, leaving stale pointer floating around still
seems like a bad idea.
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Jouni Högander <jouni.hogander@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/xe/display/xe_display.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index 00dfa68af29a..0747044f7c2a 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -520,9 +520,10 @@ void xe_display_pm_runtime_resume(struct xe_device *xe)
static void display_device_remove(struct drm_device *dev, void *arg)
{
- struct intel_display *display = arg;
+ struct xe_device *xe = arg;
- intel_display_device_remove(display);
+ intel_display_device_remove(xe->display);
+ xe->display = NULL;
}
static bool irq_enabled(struct drm_device *drm)
@@ -587,12 +588,12 @@ int xe_display_probe(struct xe_device *xe)
if (IS_ERR(display))
return PTR_ERR(display);
- err = drmm_add_action_or_reset(&xe->drm, display_device_remove, display);
- if (err)
- return err;
-
xe->display = display;
+ err = drmm_add_action_or_reset(&xe->drm, display_device_remove, xe);
+ if (err)
+ return err;
+
if (intel_display_device_present(display))
return 0;
--
2.52.0
next prev parent reply other threads:[~2026-04-15 21:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 21:04 [PATCH v3 0/7] drm/i915/reset: Expose "display_reset_count" in debugfs Ville Syrjala
2026-04-15 21:04 ` [PATCH v3 1/7] drm/i915: Clear i915->display when no longer valid Ville Syrjala
2026-04-16 8:17 ` Jani Nikula
2026-04-15 21:04 ` Ville Syrjala [this message]
2026-04-16 15:49 ` [PATCH v3 2/7] drm/xe: Clear xe->display " Jani Nikula
2026-04-15 21:04 ` [PATCH v3 3/7] drm/i915/reset: Reorganize display reset code Ville Syrjala
2026-04-15 21:04 ` [PATCH v3 4/7] drm/i915/reset: Move pending_fb_pin handling to i915 Ville Syrjala
2026-04-15 21:04 ` [PATCH v3 5/7] drm/xe/display: Add init_clock_gating.h stubs Ville Syrjala
2026-04-15 21:04 ` [PATCH v3 6/7] drm/i915/reset: Add "display_reset_count" debugfs file Ville Syrjala
2026-04-15 21:04 ` [PATCH v3 7/7] drm/i915/reset: Disable execlist per-engine reset for display reset tests Ville Syrjala
2026-04-15 21:11 ` ✓ CI.KUnit: success for drm/i915/reset: Expose "display_reset_count" in debugfs (rev4) Patchwork
2026-04-15 22:07 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-15 23:44 ` ✓ Xe.CI.FULL: " 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=20260415210411.24750-3-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=jouni.hogander@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
/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