Commit 674cf967 authored by Jesse Barnes's avatar Jesse Barnes Committed by Keith Packard

drm/i915: make FDI training a display function

Rather than branching in ironlake_pch_enable, add a new train_fdi
function to the display function pointer struct and use it instead.
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: default avatarKeith Packard <keithp@keithp.com>
Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 8eb57294
...@@ -208,7 +208,7 @@ struct drm_i915_display_funcs { ...@@ -208,7 +208,7 @@ struct drm_i915_display_funcs {
struct drm_display_mode *adjusted_mode, struct drm_display_mode *adjusted_mode,
int x, int y, int x, int y,
struct drm_framebuffer *old_fb); struct drm_framebuffer *old_fb);
void (*fdi_link_train)(struct drm_crtc *crtc);
/* clock updates for mode set */ /* clock updates for mode set */
/* cursor updates */ /* cursor updates */
/* render clock increase/decrease */ /* render clock increase/decrease */
......
...@@ -2469,10 +2469,7 @@ static void ironlake_pch_enable(struct drm_crtc *crtc) ...@@ -2469,10 +2469,7 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)
u32 reg, temp; u32 reg, temp;
/* For PCH output, training FDI link */ /* For PCH output, training FDI link */
if (IS_GEN6(dev)) dev_priv->display.fdi_link_train(crtc);
gen6_fdi_link_train(crtc);
else
ironlake_fdi_link_train(crtc);
intel_enable_pch_pll(dev_priv, pipe); intel_enable_pch_pll(dev_priv, pipe);
...@@ -7431,6 +7428,7 @@ static void intel_init_display(struct drm_device *dev) ...@@ -7431,6 +7428,7 @@ static void intel_init_display(struct drm_device *dev)
"Disable CxSR\n"); "Disable CxSR\n");
dev_priv->display.update_wm = NULL; dev_priv->display.update_wm = NULL;
} }
dev_priv->display.fdi_link_train = ironlake_fdi_link_train;
} else if (IS_GEN6(dev)) { } else if (IS_GEN6(dev)) {
if (SNB_READ_WM0_LATENCY()) { if (SNB_READ_WM0_LATENCY()) {
dev_priv->display.update_wm = sandybridge_update_wm; dev_priv->display.update_wm = sandybridge_update_wm;
...@@ -7439,6 +7437,7 @@ static void intel_init_display(struct drm_device *dev) ...@@ -7439,6 +7437,7 @@ static void intel_init_display(struct drm_device *dev)
"Disable CxSR\n"); "Disable CxSR\n");
dev_priv->display.update_wm = NULL; dev_priv->display.update_wm = NULL;
} }
dev_priv->display.fdi_link_train = gen6_fdi_link_train;
} else } else
dev_priv->display.update_wm = NULL; dev_priv->display.update_wm = NULL;
} else if (IS_PINEVIEW(dev)) { } else if (IS_PINEVIEW(dev)) {
......
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