aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 507370513f3d..c9e220963a78 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -73,9 +73,6 @@ static const uint32_t intel_cursor_formats[] = {
73 DRM_FORMAT_ARGB8888, 73 DRM_FORMAT_ARGB8888,
74}; 74};
75 75
76#define DIV_ROUND_CLOSEST_ULL(ll, d) \
77({ unsigned long long _tmp = (ll)+(d)/2; do_div(_tmp, d); _tmp; })
78
79static void intel_increase_pllclock(struct drm_device *dev, 76static void intel_increase_pllclock(struct drm_device *dev,
80 enum pipe pipe); 77 enum pipe pipe);
81static void intel_crtc_update_cursor(struct drm_crtc *crtc, bool on); 78static void intel_crtc_update_cursor(struct drm_crtc *crtc, bool on);
@@ -12357,27 +12354,36 @@ static void intel_setup_outputs(struct drm_device *dev)
12357 if (I915_READ(PCH_DP_D) & DP_DETECTED) 12354 if (I915_READ(PCH_DP_D) & DP_DETECTED)
12358 intel_dp_init(dev, PCH_DP_D, PORT_D); 12355 intel_dp_init(dev, PCH_DP_D, PORT_D);
12359 } else if (IS_VALLEYVIEW(dev)) { 12356 } else if (IS_VALLEYVIEW(dev)) {
12360 if (I915_READ(VLV_DISPLAY_BASE + GEN4_HDMIB) & SDVO_DETECTED) { 12357 /*
12358 * The DP_DETECTED bit is the latched state of the DDC
12359 * SDA pin at boot. However since eDP doesn't require DDC
12360 * (no way to plug in a DP->HDMI dongle) the DDC pins for
12361 * eDP ports may have been muxed to an alternate function.
12362 * Thus we can't rely on the DP_DETECTED bit alone to detect
12363 * eDP ports. Consult the VBT as well as DP_DETECTED to
12364 * detect eDP ports.
12365 */
12366 if (I915_READ(VLV_DISPLAY_BASE + GEN4_HDMIB) & SDVO_DETECTED)
12361 intel_hdmi_init(dev, VLV_DISPLAY_BASE + GEN4_HDMIB, 12367 intel_hdmi_init(dev, VLV_DISPLAY_BASE + GEN4_HDMIB,
12362 PORT_B); 12368 PORT_B);
12363 if (I915_READ(VLV_DISPLAY_BASE + DP_B) & DP_DETECTED) 12369 if (I915_READ(VLV_DISPLAY_BASE + DP_B) & DP_DETECTED ||
12364 intel_dp_init(dev, VLV_DISPLAY_BASE + DP_B, PORT_B); 12370 intel_dp_is_edp(dev, PORT_B))
12365 } 12371 intel_dp_init(dev, VLV_DISPLAY_BASE + DP_B, PORT_B);
12366 12372
12367 if (I915_READ(VLV_DISPLAY_BASE + GEN4_HDMIC) & SDVO_DETECTED) { 12373 if (I915_READ(VLV_DISPLAY_BASE + GEN4_HDMIC) & SDVO_DETECTED)
12368 intel_hdmi_init(dev, VLV_DISPLAY_BASE + GEN4_HDMIC, 12374 intel_hdmi_init(dev, VLV_DISPLAY_BASE + GEN4_HDMIC,
12369 PORT_C); 12375 PORT_C);
12370 if (I915_READ(VLV_DISPLAY_BASE + DP_C) & DP_DETECTED) 12376 if (I915_READ(VLV_DISPLAY_BASE + DP_C) & DP_DETECTED ||
12371 intel_dp_init(dev, VLV_DISPLAY_BASE + DP_C, PORT_C); 12377 intel_dp_is_edp(dev, PORT_C))
12372 } 12378 intel_dp_init(dev, VLV_DISPLAY_BASE + DP_C, PORT_C);
12373 12379
12374 if (IS_CHERRYVIEW(dev)) { 12380 if (IS_CHERRYVIEW(dev)) {
12375 if (I915_READ(VLV_DISPLAY_BASE + CHV_HDMID) & SDVO_DETECTED) { 12381 if (I915_READ(VLV_DISPLAY_BASE + CHV_HDMID) & SDVO_DETECTED)
12376 intel_hdmi_init(dev, VLV_DISPLAY_BASE + CHV_HDMID, 12382 intel_hdmi_init(dev, VLV_DISPLAY_BASE + CHV_HDMID,
12377 PORT_D); 12383 PORT_D);
12378 if (I915_READ(VLV_DISPLAY_BASE + DP_D) & DP_DETECTED) 12384 /* eDP not supported on port D, so don't check VBT */
12379 intel_dp_init(dev, VLV_DISPLAY_BASE + DP_D, PORT_D); 12385 if (I915_READ(VLV_DISPLAY_BASE + DP_D) & DP_DETECTED)
12380 } 12386 intel_dp_init(dev, VLV_DISPLAY_BASE + DP_D, PORT_D);
12381 } 12387 }
12382 12388
12383 intel_dsi_init(dev); 12389 intel_dsi_init(dev);