From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH 05/15] drm/i915/display: move hotplug irq funcs under hotplug sub-struct
Date: Wed, 29 Apr 2026 13:24:45 +0300 [thread overview]
Message-ID: <2a072d385e70b473daf3726d877a87c17194b172.1777458161.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1777458161.git.jani.nikula@intel.com>
Move hotplug irq related functions under hotplug sub-struct of struct
intel_display.
The funcs sub-struct of struct intel_display seems unnecessary. Instead
of display->funcs.FEATURE, prefer display->FEATURE.funcs.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
.../gpu/drm/i915/display/intel_display_core.h | 8 ++---
.../gpu/drm/i915/display/intel_hotplug_irq.c | 30 +++++++++----------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
index 01394724abc9..0c2e17edbd5f 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -47,7 +47,7 @@ struct intel_dpll_global_funcs;
struct intel_dpll_mgr;
struct intel_fbdev;
struct intel_fdi_funcs;
-struct intel_hotplug_funcs;
+struct intel_hotplug_irq_funcs;
struct intel_initial_plane_config;
struct intel_opregion;
struct intel_overlay;
@@ -155,6 +155,9 @@ struct intel_frontbuffer_tracking {
};
struct intel_hotplug {
+ /* internal hotplug irq functions */
+ const struct intel_hotplug_irq_funcs *funcs;
+
struct delayed_work hotplug_work;
const u32 *hpd, *pch_hpd;
@@ -313,9 +316,6 @@ struct intel_display {
/* Display pll funcs */
const struct intel_dpll_global_funcs *dpll;
-
- /* irq display functions */
- const struct intel_hotplug_funcs *hotplug;
} funcs;
struct {
diff --git a/drivers/gpu/drm/i915/display/intel_hotplug_irq.c b/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
index 8865cb2ac569..539fd555edce 100644
--- a/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
+++ b/drivers/gpu/drm/i915/display/intel_hotplug_irq.c
@@ -1420,7 +1420,7 @@ static void i915_hpd_irq_setup(struct intel_display *display)
hotplug_en);
}
-struct intel_hotplug_funcs {
+struct intel_hotplug_irq_funcs {
/* Enable HPD sense and interrupts for all present encoders */
void (*hpd_irq_setup)(struct intel_display *display);
/* Enable HPD sense for a single encoder */
@@ -1428,7 +1428,7 @@ struct intel_hotplug_funcs {
};
#define HPD_FUNCS(platform) \
-static const struct intel_hotplug_funcs platform##_hpd_funcs = { \
+static const struct intel_hotplug_irq_funcs platform##_hpd_funcs = { \
.hpd_irq_setup = platform##_hpd_irq_setup, \
.hpd_enable_detection = platform##_hpd_enable_detection, \
}
@@ -1447,8 +1447,8 @@ void intel_hpd_enable_detection(struct intel_encoder *encoder)
{
struct intel_display *display = to_intel_display(encoder);
- if (display->funcs.hotplug)
- display->funcs.hotplug->hpd_enable_detection(encoder);
+ if (display->hotplug.funcs)
+ display->hotplug.funcs->hpd_enable_detection(encoder);
}
void intel_hpd_irq_setup(struct intel_display *display)
@@ -1457,8 +1457,8 @@ void intel_hpd_irq_setup(struct intel_display *display)
!display->irq.vlv_display_irqs_enabled)
return;
- if (display->funcs.hotplug)
- display->funcs.hotplug->hpd_irq_setup(display);
+ if (display->hotplug.funcs)
+ display->hotplug.funcs->hpd_irq_setup(display);
}
void intel_hotplug_irq_init(struct intel_display *display)
@@ -1469,23 +1469,23 @@ void intel_hotplug_irq_init(struct intel_display *display)
if (HAS_GMCH(display)) {
if (HAS_HOTPLUG(display))
- display->funcs.hotplug = &i915_hpd_funcs;
+ display->hotplug.funcs = &i915_hpd_funcs;
} else {
if (HAS_PCH_DG2(display))
- display->funcs.hotplug = &icp_hpd_funcs;
+ display->hotplug.funcs = &icp_hpd_funcs;
else if (HAS_PCH_DG1(display))
- display->funcs.hotplug = &dg1_hpd_funcs;
+ display->hotplug.funcs = &dg1_hpd_funcs;
else if (DISPLAY_VER(display) >= 14)
- display->funcs.hotplug = &xelpdp_hpd_funcs;
+ display->hotplug.funcs = &xelpdp_hpd_funcs;
else if (DISPLAY_VER(display) >= 11)
- display->funcs.hotplug = &gen11_hpd_funcs;
+ display->hotplug.funcs = &gen11_hpd_funcs;
else if (display->platform.geminilake || display->platform.broxton)
- display->funcs.hotplug = &bxt_hpd_funcs;
+ display->hotplug.funcs = &bxt_hpd_funcs;
else if (INTEL_PCH_TYPE(display) >= PCH_ICP)
- display->funcs.hotplug = &icp_hpd_funcs;
+ display->hotplug.funcs = &icp_hpd_funcs;
else if (INTEL_PCH_TYPE(display) >= PCH_SPT)
- display->funcs.hotplug = &spt_hpd_funcs;
+ display->hotplug.funcs = &spt_hpd_funcs;
else
- display->funcs.hotplug = &ilk_hpd_funcs;
+ display->hotplug.funcs = &ilk_hpd_funcs;
}
}
--
2.47.3
next prev parent reply other threads:[~2026-04-29 10:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 10:24 [PATCH 00/15] drm/i915: refactor display funcs, add display irq hooks Jani Nikula
2026-04-29 10:24 ` [PATCH 01/15] drm/i915/display: move audio funcs under audio sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 02/15] drm/i915/display: move color funcs under color sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 03/15] drm/i915/display: move fdi funcs under fdi sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 04/15] drm/i915/display: move watermark funcs under wm sub-struct Jani Nikula
2026-04-29 10:24 ` Jani Nikula [this message]
2026-04-29 10:24 ` [PATCH 06/15] drm/i915/display: move dpll funcs under dpll sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 07/15] drm/i915/display: move cdclk funcs under cdclk sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 08/15] drm/i915/display: move display funcs under modeset sub-struct Jani Nikula
2026-04-29 10:24 ` [PATCH 09/15] drm/i915/irq: deduplicate dg1_de_irq_postinstall() and gen11_de_irq_postinstall() Jani Nikula
2026-04-29 10:24 ` [PATCH 10/15] drm/i915/irq: move VLV/CHV LPE irq handler call after irq acks Jani Nikula
2026-04-29 11:12 ` Ville Syrjälä
2026-04-30 7:49 ` Jani Nikula
2026-04-29 10:24 ` [PATCH 11/15] drm/i915/irq: constify pipe stats parameters Jani Nikula
2026-04-29 10:24 ` [PATCH 12/15] drm/i915/irq: add display irq funcs, start with intel_display_irq_reset() Jani Nikula
2026-04-29 10:24 ` [PATCH 13/15] drm/i915/irq: add intel_display_irq_postinstall() to irq funcs Jani Nikula
2026-04-29 10:24 ` [PATCH 14/15] drm/i915/irq: add intel_display_irq_ack() " Jani Nikula
2026-04-29 10:24 ` [PATCH 15/15] drm/i915/irq: add intel_display_irq_handler() " Jani Nikula
2026-04-29 11:56 ` Ville Syrjälä
2026-04-30 7:59 ` Jani Nikula
2026-04-30 10:28 ` Ville Syrjälä
2026-04-29 11:37 ` ✗ i915.CI.BAT: failure for drm/i915: refactor display funcs, add display irq hooks 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=2a072d385e70b473daf3726d877a87c17194b172.1777458161.git.jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--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