Commit 0ce29825 authored by Jani Nikula's avatar Jani Nikula

drm/i915/fdi: move intel_update_fdi_pll_freq to intel_fdi.c

Move FDI related functions to intel_fdi.c. Rename to have intel_fdi
prefix while at it.
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/da1609dfce4623f8ec86254aea6c2c8679b6a37f.1629906431.git.jani.nikula@intel.com
parent 13d69674
...@@ -11546,22 +11546,6 @@ static void sanitize_watermarks(struct drm_i915_private *dev_priv) ...@@ -11546,22 +11546,6 @@ static void sanitize_watermarks(struct drm_i915_private *dev_priv)
drm_modeset_acquire_fini(&ctx); drm_modeset_acquire_fini(&ctx);
} }
static void intel_update_fdi_pll_freq(struct drm_i915_private *dev_priv)
{
if (IS_IRONLAKE(dev_priv)) {
u32 fdi_pll_clk =
intel_de_read(dev_priv, FDI_PLL_BIOS_0) & FDI_PLL_FB_CLOCK_MASK;
dev_priv->fdi_pll_freq = (fdi_pll_clk + 2) * 10000;
} else if (IS_SANDYBRIDGE(dev_priv) || IS_IVYBRIDGE(dev_priv)) {
dev_priv->fdi_pll_freq = 270000;
} else {
return;
}
drm_dbg(&dev_priv->drm, "FDI PLL freq=%d\n", dev_priv->fdi_pll_freq);
}
static int intel_initial_commit(struct drm_device *dev) static int intel_initial_commit(struct drm_device *dev)
{ {
struct drm_atomic_state *state = NULL; struct drm_atomic_state *state = NULL;
...@@ -11815,7 +11799,7 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915) ...@@ -11815,7 +11799,7 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915)
intel_plane_possible_crtcs_init(i915); intel_plane_possible_crtcs_init(i915);
intel_shared_dpll_init(dev); intel_shared_dpll_init(dev);
intel_update_fdi_pll_freq(i915); intel_fdi_pll_freq_update(i915);
intel_update_czclk(i915); intel_update_czclk(i915);
intel_modeset_init_hw(i915); intel_modeset_init_hw(i915);
......
...@@ -95,6 +95,22 @@ static int ilk_check_fdi_lanes(struct drm_device *dev, enum pipe pipe, ...@@ -95,6 +95,22 @@ static int ilk_check_fdi_lanes(struct drm_device *dev, enum pipe pipe,
} }
} }
void intel_fdi_pll_freq_update(struct drm_i915_private *i915)
{
if (IS_IRONLAKE(i915)) {
u32 fdi_pll_clk =
intel_de_read(i915, FDI_PLL_BIOS_0) & FDI_PLL_FB_CLOCK_MASK;
i915->fdi_pll_freq = (fdi_pll_clk + 2) * 10000;
} else if (IS_SANDYBRIDGE(i915) || IS_IVYBRIDGE(i915)) {
i915->fdi_pll_freq = 270000;
} else {
return;
}
drm_dbg(&i915->drm, "FDI PLL freq=%d\n", i915->fdi_pll_freq);
}
int intel_fdi_link_freq(struct drm_i915_private *i915, int intel_fdi_link_freq(struct drm_i915_private *i915,
const struct intel_crtc_state *pipe_config) const struct intel_crtc_state *pipe_config)
{ {
......
...@@ -23,5 +23,6 @@ void ilk_fdi_pll_enable(const struct intel_crtc_state *crtc_state); ...@@ -23,5 +23,6 @@ void ilk_fdi_pll_enable(const struct intel_crtc_state *crtc_state);
void intel_fdi_init_hook(struct drm_i915_private *dev_priv); void intel_fdi_init_hook(struct drm_i915_private *dev_priv);
void hsw_fdi_link_train(struct intel_encoder *encoder, void hsw_fdi_link_train(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state); const struct intel_crtc_state *crtc_state);
void intel_fdi_pll_freq_update(struct drm_i915_private *i915);
#endif #endif
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