[PATCH 03/15] drm/i915/display: move fdi funcs under fdi sub-struct

Jani Nikula
2026-04-29T10:25:15Z

Move fdi related functions under fdi 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>
---
drivers/gpu/drm/i915/display/intel_display_core.h | 6 +++---
drivers/gpu/drm/i915/display/intel_fdi.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h
index db07e332af5a..0fdda5339e81 100644
--- a/drivers/gpu/drm/i915/display/intel_display_core.h
+++ b/drivers/gpu/drm/i915/display/intel_display_core.h
@@ -316,9 +316,6 @@ struct intel_display {

/* pm display functions */
const struct intel_wm_funcs *wm;
-
- /* fdi display functions */
- const struct intel_fdi_funcs *fdi;
} funcs;

struct {
@@ -418,6 +415,9 @@ struct intel_display {
} fbdev;

struct {
+ /* internal fdi functions */
+ const struct intel_fdi_funcs *funcs;
+
unsigned int pll_freq;
u32 rx_config;
} fdi;
diff --git a/drivers/gpu/drm/i915/display/intel_fdi.c b/drivers/gpu/drm/i915/display/intel_fdi.c
index 917f020650af..f5094655a63b 100644
--- a/drivers/gpu/drm/i915/display/intel_fdi.c
+++ b/drivers/gpu/drm/i915/display/intel_fdi.c
@@ -123,7 +123,7 @@ void intel_fdi_link_train(struct intel_crtc *crtc,
{
struct intel_display *display = to_intel_display(crtc);

- display->funcs.fdi->fdi_link_train(crtc, crtc_state);
+ display->fdi.funcs->fdi_link_train(crtc, crtc_state);
}

/**
@@ -1109,11 +1109,11 @@ void
intel_fdi_init_hook(struct intel_display *display)
{
if (display->platform.ironlake) {
- display->funcs.fdi = &ilk_funcs;
+ display->fdi.funcs = &ilk_funcs;
} else if (display->platform.sandybridge) {
- display->funcs.fdi = &gen6_funcs;
+ display->fdi.funcs = &gen6_funcs;
} else if (display->platform.ivybridge) {
/* FIXME: detect B0+ stepping and use auto training */
- display->funcs.fdi = &ivb_funcs;
+ display->fdi.funcs = &ivb_funcs;
}
}
--
2.47.3