aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_display.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a9f1307d32d8..1da7b0b9ed31 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2026,6 +2026,9 @@ static int intel_get_fifo_size(struct drm_device *dev, int plane)
2026 size = ((dsparb >> DSPARB_BEND_SHIFT) & 0x1ff) - 2026 size = ((dsparb >> DSPARB_BEND_SHIFT) & 0x1ff) -
2027 (dsparb & 0x1ff); 2027 (dsparb & 0x1ff);
2028 size >>= 1; /* Convert to cachelines */ 2028 size >>= 1; /* Convert to cachelines */
2029 } else if (IS_845G(dev)) {
2030 size = dsparb & 0x7f;
2031 size >>= 2; /* Convert to cachelines */
2029 } else { 2032 } else {
2030 size = dsparb & 0x7f; 2033 size = dsparb & 0x7f;
2031 size >>= 1; /* Convert to cachelines */ 2034 size >>= 1; /* Convert to cachelines */
@@ -2125,14 +2128,16 @@ static void i830_update_wm(struct drm_device *dev, int planea_clock,
2125 int pixel_size) 2128 int pixel_size)
2126{ 2129{
2127 struct drm_i915_private *dev_priv = dev->dev_private; 2130 struct drm_i915_private *dev_priv = dev->dev_private;
2128 uint32_t fwater_lo = I915_READ(FW_BLC) & MM_FIFO_WATERMARK; 2131 uint32_t fwater_lo = I915_READ(FW_BLC) & ~0xfff;
2129 int planea_wm; 2132 int planea_wm;
2130 2133
2131 i830_wm_info.fifo_size = intel_get_fifo_size(dev, 0); 2134 i830_wm_info.fifo_size = intel_get_fifo_size(dev, 0);
2132 2135
2133 planea_wm = intel_calculate_wm(planea_clock, &i830_wm_info, 2136 planea_wm = intel_calculate_wm(planea_clock, &i830_wm_info,
2134 pixel_size, latency_ns); 2137 pixel_size, latency_ns);
2135 fwater_lo = fwater_lo | planea_wm; 2138 fwater_lo |= (3<<8) | planea_wm;
2139
2140 DRM_DEBUG("Setting FIFO watermarks - A: %d\n", planea_wm);
2136 2141
2137 I915_WRITE(FW_BLC, fwater_lo); 2142 I915_WRITE(FW_BLC, fwater_lo);
2138} 2143}