Skip to content

Commit

Permalink
drm/i915/hpd: hide struct intel_hotplug_funcs
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Jani Nikula committed Feb 9, 2022
1 parent 6e007c3 commit 7e97596
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
7 changes: 1 addition & 6 deletions drivers/gpu/drm/i915/display/intel_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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 =
Expand Down
5 changes: 1 addition & 4 deletions drivers/gpu/drm/i915/i915_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions drivers/gpu/drm/i915/i915_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7e97596

Please sign in to comment.