Skip to content

Commit 674cf96

Browse files
jbarnes993keith-packard
authored andcommitted
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: Jesse Barnes <[email protected]> Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Keith Packard <[email protected]>
1 parent 8eb5729 commit 674cf96

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ struct drm_i915_display_funcs {
208208
struct drm_display_mode *adjusted_mode,
209209
int x, int y,
210210
struct drm_framebuffer *old_fb);
211-
211+
void (*fdi_link_train)(struct drm_crtc *crtc);
212212
/* clock updates for mode set */
213213
/* cursor updates */
214214
/* render clock increase/decrease */

drivers/gpu/drm/i915/intel_display.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,10 +2469,7 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)
24692469
u32 reg, temp;
24702470

24712471
/* For PCH output, training FDI link */
2472-
if (IS_GEN6(dev))
2473-
gen6_fdi_link_train(crtc);
2474-
else
2475-
ironlake_fdi_link_train(crtc);
2472+
dev_priv->display.fdi_link_train(crtc);
24762473

24772474
intel_enable_pch_pll(dev_priv, pipe);
24782475

@@ -7431,6 +7428,7 @@ static void intel_init_display(struct drm_device *dev)
74317428
"Disable CxSR\n");
74327429
dev_priv->display.update_wm = NULL;
74337430
}
7431+
dev_priv->display.fdi_link_train = ironlake_fdi_link_train;
74347432
} else if (IS_GEN6(dev)) {
74357433
if (SNB_READ_WM0_LATENCY()) {
74367434
dev_priv->display.update_wm = sandybridge_update_wm;
@@ -7439,6 +7437,7 @@ static void intel_init_display(struct drm_device *dev)
74397437
"Disable CxSR\n");
74407438
dev_priv->display.update_wm = NULL;
74417439
}
7440+
dev_priv->display.fdi_link_train = gen6_fdi_link_train;
74427441
} else
74437442
dev_priv->display.update_wm = NULL;
74447443
} else if (IS_PINEVIEW(dev)) {

0 commit comments

Comments
 (0)