summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_ringbuffer.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-11-30 14:07:47 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-11-30 14:08:43 +0000
commit70eac33e7ac370dc137cabff7a4ba3094ca25a8c (patch)
tree24534e03b481d2bfdc47fcc30b7322e0a431941f /drivers/gpu/drm/i915/intel_ringbuffer.c
parent7d2cb39c332146b0906651a8567f8b81af4b1584 (diff)
drm/i915: Move instruction state invalidation from execbuffer to flush
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index b1257855826..7fc55a80be2 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -109,6 +109,10 @@ render_ring_flush(struct intel_ring_buffer *ring,
if (invalidate_domains & I915_GEM_DOMAIN_INSTRUCTION)
cmd |= MI_EXE_FLUSH;
+ if (invalidate_domains & I915_GEM_DOMAIN_COMMAND &&
+ (IS_G4X(dev) || IS_GEN5(dev)))
+ cmd |= MI_INVALIDATE_ISP;
+
#if WATCH_EXEC
DRM_INFO("%s: queue flush %08x to ring\n", __func__, cmd);
#endif
@@ -583,17 +587,6 @@ render_ring_dispatch_execbuffer(struct intel_ring_buffer *ring,
intel_ring_advance(ring);
}
- if (IS_G4X(dev) || IS_GEN5(dev)) {
- if (intel_ring_begin(ring, 2) == 0) {
- intel_ring_emit(ring, MI_FLUSH |
- MI_NO_WRITE_FLUSH |
- MI_INVALIDATE_ISP );
- intel_ring_emit(ring, MI_NOOP);
- intel_ring_advance(ring);
- }
- }
- /* XXX breadcrumb */
-
return 0;
}