Commit 5a04eb5b authored by Jani Nikula's avatar Jani Nikula

drm/i915: move hotplug_funcs to display.funcs

Move display hotplug functions under drm_i915_private display
sub-struct.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarArun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1cf677f1d02b8b621ec41ff77fe5de26d4f6954a.1661346845.git.jani.nikula@intel.com
parent ae611d17
......@@ -13,6 +13,7 @@ struct intel_cdclk_funcs;
struct intel_crtc;
struct intel_crtc_state;
struct intel_dpll_funcs;
struct intel_hotplug_funcs;
struct intel_initial_plane_config;
struct intel_display_funcs {
......@@ -42,6 +43,9 @@ struct intel_display {
/* Display pll funcs */
const struct intel_dpll_funcs *dpll;
/* irq display functions */
const struct intel_hotplug_funcs *hotplug;
} funcs;
};
......
......@@ -94,7 +94,6 @@ struct intel_encoder;
struct intel_fbdev;
struct intel_fdi_funcs;
struct intel_gmbus;
struct intel_hotplug_funcs;
struct intel_limit;
struct intel_overlay;
struct intel_overlay_error_state;
......@@ -509,9 +508,6 @@ struct drm_i915_private {
/* pm display functions */
const struct drm_i915_wm_disp_funcs *wm_disp;
/* irq display functions */
const struct intel_hotplug_funcs *hotplug_funcs;
/* fdi display functions */
const struct intel_fdi_funcs *fdi_funcs;
......
......@@ -4370,8 +4370,8 @@ HPD_FUNCS(ilk);
void intel_hpd_irq_setup(struct drm_i915_private *i915)
{
if (i915->display_irqs_enabled && i915->hotplug_funcs)
i915->hotplug_funcs->hpd_irq_setup(i915);
if (i915->display_irqs_enabled && i915->display.funcs.hotplug)
i915->display.funcs.hotplug->hpd_irq_setup(i915);
}
/**
......@@ -4424,22 +4424,22 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
if (HAS_GMCH(dev_priv)) {
if (I915_HAS_HOTPLUG(dev_priv))
dev_priv->hotplug_funcs = &i915_hpd_funcs;
dev_priv->display.funcs.hotplug = &i915_hpd_funcs;
} else {
if (HAS_PCH_DG2(dev_priv))
dev_priv->hotplug_funcs = &icp_hpd_funcs;
dev_priv->display.funcs.hotplug = &icp_hpd_funcs;
else if (HAS_PCH_DG1(dev_priv))
dev_priv->hotplug_funcs = &dg1_hpd_funcs;
dev_priv->display.funcs.hotplug = &dg1_hpd_funcs;
else if (DISPLAY_VER(dev_priv) >= 11)
dev_priv->hotplug_funcs = &gen11_hpd_funcs;
dev_priv->display.funcs.hotplug = &gen11_hpd_funcs;
else if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv))
dev_priv->hotplug_funcs = &bxt_hpd_funcs;
dev_priv->display.funcs.hotplug = &bxt_hpd_funcs;
else if (INTEL_PCH_TYPE(dev_priv) >= PCH_ICP)
dev_priv->hotplug_funcs = &icp_hpd_funcs;
dev_priv->display.funcs.hotplug = &icp_hpd_funcs;
else if (INTEL_PCH_TYPE(dev_priv) >= PCH_SPT)
dev_priv->hotplug_funcs = &spt_hpd_funcs;
dev_priv->display.funcs.hotplug = &spt_hpd_funcs;
else
dev_priv->hotplug_funcs = &ilk_hpd_funcs;
dev_priv->display.funcs.hotplug = &ilk_hpd_funcs;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment