aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index fc66af6a9448..80fce51e2f43 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -401,6 +401,14 @@ static int init_render_ring(struct intel_ring_buffer *ring)
401 if (INTEL_INFO(dev)->gen >= 6) { 401 if (INTEL_INFO(dev)->gen >= 6) {
402 I915_WRITE(INSTPM, 402 I915_WRITE(INSTPM,
403 INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); 403 INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING);
404
405 /* From the Sandybridge PRM, volume 1 part 3, page 24:
406 * "If this bit is set, STCunit will have LRA as replacement
407 * policy. [...] This bit must be reset. LRA replacement
408 * policy is not supported."
409 */
410 I915_WRITE(CACHE_MODE_0,
411 CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT);
404 } 412 }
405 413
406 return ret; 414 return ret;
@@ -626,7 +634,7 @@ gen6_ring_get_seqno(struct intel_ring_buffer *ring)
626 /* Workaround to force correct ordering between irq and seqno writes on 634 /* Workaround to force correct ordering between irq and seqno writes on
627 * ivb (and maybe also on snb) by reading from a CS register (like 635 * ivb (and maybe also on snb) by reading from a CS register (like
628 * ACTHD) before reading the status page. */ 636 * ACTHD) before reading the status page. */
629 if (IS_GEN7(dev)) 637 if (IS_GEN6(dev) || IS_GEN7(dev))
630 intel_ring_get_active_head(ring); 638 intel_ring_get_active_head(ring);
631 return intel_read_status_page(ring, I915_GEM_HWS_INDEX); 639 return intel_read_status_page(ring, I915_GEM_HWS_INDEX);
632} 640}
@@ -1038,7 +1046,7 @@ int intel_init_ring_buffer(struct drm_device *dev,
1038 * of the buffer. 1046 * of the buffer.
1039 */ 1047 */
1040 ring->effective_size = ring->size; 1048 ring->effective_size = ring->size;
1041 if (IS_I830(ring->dev)) 1049 if (IS_I830(ring->dev) || IS_845G(ring->dev))
1042 ring->effective_size -= 128; 1050 ring->effective_size -= 128;
1043 1051
1044 return 0; 1052 return 0;