diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-09-12 16:28:34 +0200 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-09-12 16:28:34 +0200 |
commit | 861b26578cd5e497fb506ad5952fa62bd03ea201 (patch) | |
tree | 1446273a22a6579ddfa17bf216e2a3db14ef3288 /linux-core/i915_buffer.c | |
parent | 191e284709ee792a32124e96e43d5876406b93dc (diff) |
Use lazy fence wait when possible even for RW fences. Saves some CPU.
Lindent.
Diffstat (limited to 'linux-core/i915_buffer.c')
-rw-r--r-- | linux-core/i915_buffer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c index 598f8772..9e8ae4a9 100644 --- a/linux-core/i915_buffer.c +++ b/linux-core/i915_buffer.c @@ -53,6 +53,10 @@ int i915_fence_types(uint32_t buffer_flags, uint32_t *class, uint32_t *type) int i915_invalidate_caches(drm_device_t *dev, uint32_t flags) { + /* + * FIXME: Only emit once per batchbuffer submission. + */ + uint32_t flush_cmd = MI_NO_WRITE_FLUSH; if (flags & DRM_BO_FLAG_READ) @@ -60,5 +64,6 @@ int i915_invalidate_caches(drm_device_t *dev, uint32_t flags) if (flags & DRM_BO_FLAG_EXE) flush_cmd |= MI_EXE_FLUSH; + return i915_emit_mi_flush(dev, flush_cmd); } |