diff mbox

[11/11] drm/i915: order fence setup wrt subsequent wc cpu writes

Message ID fe08d94c7eeb6848ae1a7d33fdd9cbadbad974a6.1263558064.git.daniel.vetter@ffwll.ch (mailing list archive)
State Superseded
Headers show

Commit Message

Daniel Vetter Jan. 15, 2010, 12:24 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index b11cd68..1b466d2 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2335,6 +2335,7 @@  static void i965_write_fence_reg(struct drm_i915_fence_reg *reg)
 	val |= I965_FENCE_REG_VALID;
 
 	I915_WRITE64(FENCE_REG_965_0 + (regnum * 8), val);
+	I915_READ64(FENCE_REG_965_0 + (regnum * 8));
 }
 
 static void i915_write_fence_reg(struct drm_i915_fence_reg *reg)
@@ -2377,6 +2378,7 @@  static void i915_write_fence_reg(struct drm_i915_fence_reg *reg)
 	else
 		fence_reg = FENCE_REG_945_8 + ((regnum - 8) * 4);
 	I915_WRITE(fence_reg, val);
+	I915_READ(fence_reg);
 }
 
 static void i830_write_fence_reg(struct drm_i915_fence_reg *reg)
@@ -2411,6 +2413,7 @@  static void i830_write_fence_reg(struct drm_i915_fence_reg *reg)
 	val |= I830_FENCE_REG_VALID;
 
 	I915_WRITE(FENCE_REG_830_0 + (regnum * 4), val);
+	I915_READ(FENCE_REG_830_0 + (regnum * 4));
 }
 
 static int i915_find_fence_reg(struct drm_device *dev)