diff options
| author | Takashi Iwai <tiwai@suse.de> | 2012-05-21 12:45:18 +0200 | 
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2012-05-21 12:45:18 +0200 | 
| commit | 775b2449bdba7c97dda9f274c92bf7a83dac4142 (patch) | |
| tree | b4bee45c13762ea93642b1e38c62de454e51cf5d /drivers/gpu/drm/i915/intel_ringbuffer.c | |
| parent | 21363cf0ca5c9c62e34e37422fb1d13d70d3de3c (diff) | |
| parent | 5fb86e5d4a951ddb0474cdfd809380c8e2a8d101 (diff) | |
| download | olio-linux-3.10-775b2449bdba7c97dda9f274c92bf7a83dac4142.tar.xz olio-linux-3.10-775b2449bdba7c97dda9f274c92bf7a83dac4142.zip  | |
Merge branch 'topic/asoc' into for-linus
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
| -rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 15 | 
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index fc66af6a944..62892a826ed 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -398,6 +398,17 @@ static int init_render_ring(struct intel_ring_buffer *ring)  			return ret;  	} + +	if (IS_GEN6(dev)) { +		/* From the Sandybridge PRM, volume 1 part 3, page 24: +		 * "If this bit is set, STCunit will have LRA as replacement +		 *  policy. [...] This bit must be reset.  LRA replacement +		 *  policy is not supported." +		 */ +		I915_WRITE(CACHE_MODE_0, +			   CM0_STC_EVICT_DISABLE_LRA_SNB << CM0_MASK_SHIFT); +	} +  	if (INTEL_INFO(dev)->gen >= 6) {  		I915_WRITE(INSTPM,  			   INSTPM_FORCE_ORDERING << 16 | INSTPM_FORCE_ORDERING); @@ -626,7 +637,7 @@ gen6_ring_get_seqno(struct intel_ring_buffer *ring)  	/* Workaround to force correct ordering between irq and seqno writes on  	 * ivb (and maybe also on snb) by reading from a CS register (like  	 * ACTHD) before reading the status page. */ -	if (IS_GEN7(dev)) +	if (IS_GEN6(dev) || IS_GEN7(dev))  		intel_ring_get_active_head(ring);  	return intel_read_status_page(ring, I915_GEM_HWS_INDEX);  } @@ -1038,7 +1049,7 @@ int intel_init_ring_buffer(struct drm_device *dev,  	 * of the buffer.  	 */  	ring->effective_size = ring->size; -	if (IS_I830(ring->dev)) +	if (IS_I830(ring->dev) || IS_845G(ring->dev))  		ring->effective_size -= 128;  	return 0;  |