drm/i915/hpd: hide struct intel_hotplug_funcs
authorJani Nikula <jani.nikula@intel.com>
Thu, 3 Feb 2022 14:02:29 +0000 (16:02 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 9 Feb 2022 11:39:35 +0000 (13:39 +0200)
With intel_hpd_irq_setup() in i915_irq.c, struct intel_hotplug_funcs is
also only needed there.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/9a10dbca7ad298dde62b83f76e0df43a67bceeef.1643896905.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_hotplug.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_irq.h

index 912b700..8204126 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 
 #include "i915_drv.h"
+#include "i915_irq.h"
 #include "intel_display_types.h"
 #include "intel_hotplug.h"
 
@@ -213,12 +214,6 @@ intel_hpd_irq_storm_switch_to_polling(struct drm_i915_private *dev_priv)
        }
 }
 
-static 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);
-}
-
 static void intel_hpd_irq_storm_reenable_work(struct work_struct *work)
 {
        struct drm_i915_private *dev_priv =
index 2c22725..ea2749e 100644 (file)
@@ -121,6 +121,7 @@ struct intel_crtc;
 struct intel_dp;
 struct intel_encoder;
 struct intel_fbdev;
+struct intel_hotplug_funcs;
 struct intel_initial_plane_config;
 struct intel_limit;
 struct intel_overlay;
@@ -321,10 +322,6 @@ struct drm_i915_wm_disp_funcs {
        int (*compute_global_watermarks)(struct intel_atomic_state *state);
 };
 
-struct intel_hotplug_funcs {
-       void (*hpd_irq_setup)(struct drm_i915_private *dev_priv);
-};
-
 struct intel_fdi_funcs {
        void (*fdi_link_train)(struct intel_crtc *crtc,
                               const struct intel_crtc_state *crtc_state);
index c05eb09..4e97d22 100644 (file)
@@ -4347,6 +4347,10 @@ static irqreturn_t i965_irq_handler(int irq, void *arg)
        return ret;
 }
 
+struct intel_hotplug_funcs {
+       void (*hpd_irq_setup)(struct drm_i915_private *i915);
+};
+
 #define HPD_FUNCS(platform)                                     \
 static const struct intel_hotplug_funcs platform##_hpd_funcs = { \
        .hpd_irq_setup = platform##_hpd_irq_setup,               \
@@ -4361,6 +4365,12 @@ HPD_FUNCS(spt);
 HPD_FUNCS(ilk);
 #undef HPD_FUNCS
 
+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);
+}
+
 /**
  * intel_irq_init - initializes irq support
  * @dev_priv: i915 device instance
index 0eb90d2..82639d9 100644 (file)
@@ -37,6 +37,7 @@ i915_disable_pipestat(struct drm_i915_private *dev_priv, enum pipe pipe,
 void valleyview_enable_display_irqs(struct drm_i915_private *dev_priv);
 void valleyview_disable_display_irqs(struct drm_i915_private *dev_priv);
 
+void intel_hpd_irq_setup(struct drm_i915_private *i915);
 void i915_hotplug_interrupt_update(struct drm_i915_private *dev_priv,
                                   u32 mask,
                                   u32 bits);