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 4/4] drm/i915/reset: Add "display_reset_count" debugfs file
Date: Fri, 10 Apr 2026 10:35:00 +0300 [thread overview]
Message-ID: <20260410073500.32308-5-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260410073500.32308-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Expose the number of display resets performed in a new
"display_reset_count" debugfs file. kms_busy can use this to
confirm that the kernel actually took the full display reset path.
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/i915/display/intel_display_core.h | 4 ++++
drivers/gpu/drm/i915/display/intel_display_debugfs.c | 2 ++
drivers/gpu/drm/i915/display/intel_display_reset.c | 10 ++++++++++
drivers/gpu/drm/i915/display/intel_display_reset.h | 2 ++
drivers/gpu/drm/xe/Makefile | 1 +
5 files changed, 19 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
index 9e77003addd0..38535d1056d1 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -556,6 +556,10 @@ struct intel_display {
unsigned long mask;
} quirks;
+ struct {
+ u32 count;
+ } reset;
+
struct {
/* restore state for suspend/resume and display reset */
struct drm_atomic_state *modeset_state;
diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index f244a2b5d139..81bef000a4e3 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -27,6 +27,7 @@
#include "intel_display_power.h"
#include "intel_display_power_well.h"
#include "intel_display_regs.h"
+#include "intel_display_reset.h"
#include "intel_display_rpm.h"
#include "intel_display_types.h"
#include "intel_dmc.h"
@@ -838,6 +839,7 @@ void intel_display_debugfs_register(struct intel_display *display)
intel_bios_debugfs_register(display);
intel_cdclk_debugfs_register(display);
+ intel_display_reset_debugfs_register(display);
intel_dmc_debugfs_register(display);
intel_dp_test_debugfs_register(display);
intel_fbc_debugfs_register(display);
diff --git a/drivers/gpu/drm/i915/display/intel_display_reset.c b/drivers/gpu/drm/i915/display/intel_display_reset.c
index ca15dc18ef0f..79c2e77ca137 100644
--- a/drivers/gpu/drm/i915/display/intel_display_reset.c
+++ b/drivers/gpu/drm/i915/display/intel_display_reset.c
@@ -3,6 +3,8 @@
* Copyright © 2023 Intel Corporation
*/
+#include <linux/debugfs.h>
+
#include <drm/drm_atomic_helper.h>
#include <drm/drm_print.h>
@@ -66,6 +68,7 @@ void intel_display_reset_prepare(struct intel_display *display)
return;
}
+ display->reset.count++;
display->restore.modeset_state = state;
state->acquire_ctx = ctx;
}
@@ -114,3 +117,10 @@ void intel_display_reset_finish(struct intel_display *display, bool test_only)
drm_modeset_acquire_fini(ctx);
mutex_unlock(&display->drm->mode_config.mutex);
}
+
+void intel_display_reset_debugfs_register(struct intel_display *display)
+{
+ debugfs_create_u32("display_reset_count", 0400,
+ display->drm->debugfs_root,
+ &display->reset.count);
+}
diff --git a/drivers/gpu/drm/i915/display/intel_display_reset.h b/drivers/gpu/drm/i915/display/intel_display_reset.h
index a8aa7729d33f..b88c330a3441 100644
--- a/drivers/gpu/drm/i915/display/intel_display_reset.h
+++ b/drivers/gpu/drm/i915/display/intel_display_reset.h
@@ -15,4 +15,6 @@ bool intel_display_reset_test(struct intel_display *display);
void intel_display_reset_prepare(struct intel_display *display);
void intel_display_reset_finish(struct intel_display *display, bool test_only);
+void intel_display_reset_debugfs_register(struct intel_display *display);
+
#endif /* __INTEL_RESET_H__ */
diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
index 110fef511fe2..1a85dfe457f0 100644
--- a/drivers/gpu/drm/xe/Makefile
+++ b/drivers/gpu/drm/xe/Makefile
@@ -262,6 +262,7 @@ xe-$(CONFIG_DRM_XE_DISPLAY) += \
i915-display/intel_display_power.o \
i915-display/intel_display_power_map.o \
i915-display/intel_display_power_well.o \
+ i915-display/intel_display_reset.o \
i915-display/intel_display_rpm.o \
i915-display/intel_display_rps.o \
i915-display/intel_display_trace.o \
--
2.52.0
next prev parent reply other threads:[~2026-04-10 7:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 7:34 [PATCH 0/4] drm/i915/reset: Expose "display_reset_count" in debugfs Ville Syrjala
2026-04-10 7:34 ` [PATCH 1/4] drm/i915/reset: Reorganize display reset code Ville Syrjala
2026-04-10 7:34 ` [PATCH 2/4] drm/i915/reset: Move pending_fb_pin handling to i915 Ville Syrjala
2026-04-10 7:34 ` [PATCH 3/4] drm/xe/display: Add init_clock_gating.h stubs Ville Syrjala
2026-04-10 7:35 ` Ville Syrjala [this message]
2026-04-10 7:42 ` [PATCH 4/4] drm/i915/reset: Add "display_reset_count" debugfs file Jani Nikula
2026-04-10 7:56 ` Ville Syrjälä
2026-04-10 8:46 ` Jani Nikula
2026-04-10 7:42 ` ✓ CI.KUnit: success for drm/i915/reset: Expose "display_reset_count" in debugfs Patchwork
2026-04-10 8:20 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-10 14:41 ` ✗ 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=20260410073500.32308-5-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