On Mon, Dec 13, 2021 at 01:41:06PM +0200, Jani Nikula wrote: > The funcs struct can be opaque, make it internal to intel_cdclk.c. > > Suggested-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_cdclk.c | 11 +++++++++++ > drivers/gpu/drm/i915/i915_drv.h | 12 +----------- > 2 files changed, 12 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c > index c30cf8d2b835..249f81a80eb7 100644 > --- a/drivers/gpu/drm/i915/display/intel_cdclk.c > +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c > @@ -63,6 +63,17 @@ > * dividers can be programmed correctly. > */ > > +struct intel_cdclk_funcs { > + void (*get_cdclk)(struct drm_i915_private *i915, > + struct intel_cdclk_config *cdclk_config); > + void (*set_cdclk)(struct drm_i915_private *i915, > + const struct intel_cdclk_config *cdclk_config, > + enum pipe pipe); > + int (*bw_calc_min_cdclk)(struct intel_atomic_state *state); > + int (*modeset_calc_cdclk)(struct intel_cdclk_state *state); > + u8 (*calc_voltage_level)(int cdclk); > +}; > + > void intel_cdclk_get_cdclk(struct drm_i915_private *dev_priv, > struct intel_cdclk_config *cdclk_config) > { > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index e2c0d69753b1..0112ae942664 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -291,6 +291,7 @@ struct intel_connector; > struct intel_encoder; > struct intel_atomic_state; > struct intel_cdclk_config; > +struct intel_cdclk_funcs; > struct intel_cdclk_state; > struct intel_cdclk_vals; > struct intel_initial_plane_config; > @@ -339,17 +340,6 @@ struct intel_color_funcs { > void (*read_luts)(struct intel_crtc_state *crtc_state); > }; > > -struct intel_cdclk_funcs { > - void (*get_cdclk)(struct drm_i915_private *dev_priv, > - struct intel_cdclk_config *cdclk_config); > - void (*set_cdclk)(struct drm_i915_private *dev_priv, > - const struct intel_cdclk_config *cdclk_config, > - enum pipe pipe); > - int (*bw_calc_min_cdclk)(struct intel_atomic_state *state); > - int (*modeset_calc_cdclk)(struct intel_cdclk_state *state); > - u8 (*calc_voltage_level)(int cdclk); > -}; > - > struct intel_hotplug_funcs { > void (*hpd_irq_setup)(struct drm_i915_private *dev_priv); > }; > -- > 2.30.2 -- Ville Syrjälä Intel