From: Luca Coelho <luciano.coelho@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org, jani.nikula@linux.intel.com
Subject: [PATCH v4 2/2] drm/i915/display: split part of intel_display_reset_finish() to a new function
Date: Tue, 8 Sep 2026 11:43:03 +0300 [thread overview]
Message-ID: <20260908090924.52117-3-luciano.coelho@intel.com> (raw)
In-Reply-To: <20260908090924.52117-1-luciano.coelho@intel.com>
In the intel_display_reset_finish() function, we are currently calling
the non-display function intel_clock_gating_init(), creating an
unnecessary dependency.
In order to avoid this, split out the function calls that happen
before the call to intel_clock_gating_init() to a new function that
can be directly called by intel_gt_reset_global(), which then calls
intel_clock_gating_init() itself, if needed.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
.../drm/i915/display/intel_display_reset.c | 19 +++++++++++++------
.../drm/i915/display/intel_display_reset.h | 1 +
drivers/gpu/drm/i915/gt/intel_reset.c | 5 +++++
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_reset.c b/drivers/gpu/drm/i915/display/intel_display_reset.c
index 504ec7043cd9..529dd1c1fa5d 100644
--- a/drivers/gpu/drm/i915/display/intel_display_reset.c
+++ b/drivers/gpu/drm/i915/display/intel_display_reset.c
@@ -8,7 +8,6 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_print.h>
-#include "intel_clock_gating.h"
#include "intel_cx0_phy.h"
#include "intel_display_core.h"
#include "intel_display_driver.h"
@@ -73,6 +72,17 @@ void intel_display_reset_prepare(struct intel_display *display)
state->acquire_ctx = ctx;
}
+bool intel_display_reset_reinit(struct intel_display *display)
+{
+ if (!display->restore.modeset_state)
+ return false;
+
+ intel_pps_unlock_regs_wa(display);
+ intel_display_driver_init_hw(display);
+
+ return true;
+}
+
void intel_display_reset_finish(struct intel_display *display, bool test_only)
{
struct drm_modeset_acquire_ctx *ctx = &display->restore.reset_ctx;
@@ -94,12 +104,9 @@ void intel_display_reset_finish(struct intel_display *display, bool test_only)
}
} else {
/*
- * The display has been reset as well,
- * so need a full re-initialization.
+ * The display has been reset as well, so complete the
+ * re-initialization started by intel_display_reset_reinit().
*/
- intel_pps_unlock_regs_wa(display);
- intel_display_driver_init_hw(display);
- intel_clock_gating_init(display->drm);
intel_cx0_pll_power_save_wa(display);
intel_hpd_init(display);
diff --git a/drivers/gpu/drm/i915/display/intel_display_reset.h b/drivers/gpu/drm/i915/display/intel_display_reset.h
index b88c330a3441..e741e969d877 100644
--- a/drivers/gpu/drm/i915/display/intel_display_reset.h
+++ b/drivers/gpu/drm/i915/display/intel_display_reset.h
@@ -13,6 +13,7 @@ struct intel_display;
bool intel_display_reset_supported(struct intel_display *display);
bool intel_display_reset_test(struct intel_display *display);
void intel_display_reset_prepare(struct intel_display *display);
+bool intel_display_reset_reinit(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);
diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
index 6053f3e8aa27..be282cfbe615 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -24,6 +24,7 @@
#include "i915_reg.h"
#include "i915_wait_util.h"
#include "intel_breadcrumbs.h"
+#include "intel_clock_gating.h"
#include "intel_engine_pm.h"
#include "intel_engine_regs.h"
#include "intel_gt.h"
@@ -1445,6 +1446,10 @@ static void intel_gt_reset_global(struct intel_gt *gt,
intel_gt_reset(gt, engine_mask, reason);
+ if (need_display_reset &&
+ intel_display_reset_reinit(display))
+ intel_clock_gating_init(&i915->drm);
+
if (reset_display)
intel_display_reset_finish(display, !need_display_reset);
}
--
2.53.0
next prev parent reply other threads:[~2026-09-08 9:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 8:43 [PATCH v4 0/2] drm/i915/display: reduce clock_gating interface between core and display Luca Coelho
2026-09-08 8:43 ` [PATCH v4 1/2] drm/i915/display: add a way to restore only display/pch registers in clock_gating Luca Coelho
2026-09-08 8:43 ` Luca Coelho [this message]
2026-09-08 11:09 ` ✓ CI.KUnit: success for drm/i915/display: reduce clock_gating interface between core and display (rev2) Patchwork
2026-09-08 12:13 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-08 15:08 ` ✓ 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=20260908090924.52117-3-luciano.coelho@intel.com \
--to=luciano.coelho@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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