diff options
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 20 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 8 |
3 files changed, 18 insertions, 18 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index b3b51c43dad0..00fbff5ddd81 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -1872,7 +1872,7 @@ static void intel_update_fbc(struct drm_device *dev) | |||
1872 | if (enable_fbc < 0) { | 1872 | if (enable_fbc < 0) { |
1873 | DRM_DEBUG_KMS("fbc set to per-chip default\n"); | 1873 | DRM_DEBUG_KMS("fbc set to per-chip default\n"); |
1874 | enable_fbc = 1; | 1874 | enable_fbc = 1; |
1875 | if (INTEL_INFO(dev)->gen <= 5) | 1875 | if (INTEL_INFO(dev)->gen <= 6) |
1876 | enable_fbc = 0; | 1876 | enable_fbc = 0; |
1877 | } | 1877 | } |
1878 | if (!enable_fbc) { | 1878 | if (!enable_fbc) { |
@@ -5307,6 +5307,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
5307 | } | 5307 | } |
5308 | } | 5308 | } |
5309 | 5309 | ||
5310 | pipeconf &= ~PIPECONF_INTERLACE_MASK; | ||
5310 | if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) { | 5311 | if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) { |
5311 | pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION; | 5312 | pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION; |
5312 | /* the chip adds 2 halflines automatically */ | 5313 | /* the chip adds 2 halflines automatically */ |
@@ -5317,7 +5318,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
5317 | adjusted_mode->crtc_vsync_end -= 1; | 5318 | adjusted_mode->crtc_vsync_end -= 1; |
5318 | adjusted_mode->crtc_vsync_start -= 1; | 5319 | adjusted_mode->crtc_vsync_start -= 1; |
5319 | } else | 5320 | } else |
5320 | pipeconf &= ~PIPECONF_INTERLACE_MASK; /* progressive */ | 5321 | pipeconf |= PIPECONF_PROGRESSIVE; |
5321 | 5322 | ||
5322 | I915_WRITE(HTOTAL(pipe), | 5323 | I915_WRITE(HTOTAL(pipe), |
5323 | (adjusted_mode->crtc_hdisplay - 1) | | 5324 | (adjusted_mode->crtc_hdisplay - 1) | |
@@ -5902,6 +5903,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc, | |||
5902 | } | 5903 | } |
5903 | } | 5904 | } |
5904 | 5905 | ||
5906 | pipeconf &= ~PIPECONF_INTERLACE_MASK; | ||
5905 | if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) { | 5907 | if (adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) { |
5906 | pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION; | 5908 | pipeconf |= PIPECONF_INTERLACE_W_FIELD_INDICATION; |
5907 | /* the chip adds 2 halflines automatically */ | 5909 | /* the chip adds 2 halflines automatically */ |
@@ -5912,7 +5914,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc, | |||
5912 | adjusted_mode->crtc_vsync_end -= 1; | 5914 | adjusted_mode->crtc_vsync_end -= 1; |
5913 | adjusted_mode->crtc_vsync_start -= 1; | 5915 | adjusted_mode->crtc_vsync_start -= 1; |
5914 | } else | 5916 | } else |
5915 | pipeconf &= ~PIPECONF_INTERLACE_W_FIELD_INDICATION; /* progressive */ | 5917 | pipeconf |= PIPECONF_PROGRESSIVE; |
5916 | 5918 | ||
5917 | I915_WRITE(HTOTAL(pipe), | 5919 | I915_WRITE(HTOTAL(pipe), |
5918 | (adjusted_mode->crtc_hdisplay - 1) | | 5920 | (adjusted_mode->crtc_hdisplay - 1) | |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index db3b461ad412..94f860cce3f7 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -208,17 +208,8 @@ intel_dp_link_clock(uint8_t link_bw) | |||
208 | */ | 208 | */ |
209 | 209 | ||
210 | static int | 210 | static int |
211 | intel_dp_link_required(struct intel_dp *intel_dp, int pixel_clock, int check_bpp) | 211 | intel_dp_link_required(int pixel_clock, int bpp) |
212 | { | 212 | { |
213 | struct drm_crtc *crtc = intel_dp->base.base.crtc; | ||
214 | struct intel_crtc *intel_crtc = to_intel_crtc(crtc); | ||
215 | int bpp = 24; | ||
216 | |||
217 | if (check_bpp) | ||
218 | bpp = check_bpp; | ||
219 | else if (intel_crtc) | ||
220 | bpp = intel_crtc->bpp; | ||
221 | |||
222 | return (pixel_clock * bpp + 9) / 10; | 213 | return (pixel_clock * bpp + 9) / 10; |
223 | } | 214 | } |
224 | 215 | ||
@@ -245,12 +236,11 @@ intel_dp_mode_valid(struct drm_connector *connector, | |||
245 | return MODE_PANEL; | 236 | return MODE_PANEL; |
246 | } | 237 | } |
247 | 238 | ||
248 | mode_rate = intel_dp_link_required(intel_dp, mode->clock, 0); | 239 | mode_rate = intel_dp_link_required(mode->clock, 24); |
249 | max_rate = intel_dp_max_data_rate(max_link_clock, max_lanes); | 240 | max_rate = intel_dp_max_data_rate(max_link_clock, max_lanes); |
250 | 241 | ||
251 | if (mode_rate > max_rate) { | 242 | if (mode_rate > max_rate) { |
252 | mode_rate = intel_dp_link_required(intel_dp, | 243 | mode_rate = intel_dp_link_required(mode->clock, 18); |
253 | mode->clock, 18); | ||
254 | if (mode_rate > max_rate) | 244 | if (mode_rate > max_rate) |
255 | return MODE_CLOCK_HIGH; | 245 | return MODE_CLOCK_HIGH; |
256 | else | 246 | else |
@@ -683,7 +673,7 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, | |||
683 | int lane_count, clock; | 673 | int lane_count, clock; |
684 | int max_lane_count = intel_dp_max_lane_count(intel_dp); | 674 | int max_lane_count = intel_dp_max_lane_count(intel_dp); |
685 | int max_clock = intel_dp_max_link_bw(intel_dp) == DP_LINK_BW_2_7 ? 1 : 0; | 675 | int max_clock = intel_dp_max_link_bw(intel_dp) == DP_LINK_BW_2_7 ? 1 : 0; |
686 | int bpp = mode->private_flags & INTEL_MODE_DP_FORCE_6BPC ? 18 : 0; | 676 | int bpp = mode->private_flags & INTEL_MODE_DP_FORCE_6BPC ? 18 : 24; |
687 | static int bws[2] = { DP_LINK_BW_1_62, DP_LINK_BW_2_7 }; | 677 | static int bws[2] = { DP_LINK_BW_1_62, DP_LINK_BW_2_7 }; |
688 | 678 | ||
689 | if (is_edp(intel_dp) && intel_dp->panel_fixed_mode) { | 679 | if (is_edp(intel_dp) && intel_dp->panel_fixed_mode) { |
@@ -701,7 +691,7 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, | |||
701 | for (clock = 0; clock <= max_clock; clock++) { | 691 | for (clock = 0; clock <= max_clock; clock++) { |
702 | int link_avail = intel_dp_max_data_rate(intel_dp_link_clock(bws[clock]), lane_count); | 692 | int link_avail = intel_dp_max_data_rate(intel_dp_link_clock(bws[clock]), lane_count); |
703 | 693 | ||
704 | if (intel_dp_link_required(intel_dp, mode->clock, bpp) | 694 | if (intel_dp_link_required(mode->clock, bpp) |
705 | <= link_avail) { | 695 | <= link_avail) { |
706 | intel_dp->link_bw = bws[clock]; | 696 | intel_dp->link_bw = bws[clock]; |
707 | intel_dp->lane_count = lane_count; | 697 | intel_dp->lane_count = lane_count; |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 798f6e1aa544..aa84832b0e1a 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -694,6 +694,14 @@ static const struct dmi_system_id intel_no_lvds[] = { | |||
694 | }, | 694 | }, |
695 | { | 695 | { |
696 | .callback = intel_no_lvds_dmi_callback, | 696 | .callback = intel_no_lvds_dmi_callback, |
697 | .ident = "AOpen i45GMx-I", | ||
698 | .matches = { | ||
699 | DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"), | ||
700 | DMI_MATCH(DMI_BOARD_NAME, "i45GMx-I"), | ||
701 | }, | ||
702 | }, | ||
703 | { | ||
704 | .callback = intel_no_lvds_dmi_callback, | ||
697 | .ident = "Aopen i945GTt-VFA", | 705 | .ident = "Aopen i945GTt-VFA", |
698 | .matches = { | 706 | .matches = { |
699 | DMI_MATCH(DMI_PRODUCT_VERSION, "AO00001JW"), | 707 | DMI_MATCH(DMI_PRODUCT_VERSION, "AO00001JW"), |