Properly propagate the user-space fence flags.
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Tue, 15 Jan 2008 09:03:41 +0000 (10:03 +0100)
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Tue, 15 Jan 2008 09:03:41 +0000 (10:03 +0100)
This avoids a sync flush when user-space has already programmed
and MI_FLUSH in the batchbuffer.

shared-core/i915_dma.c

index 4b97a39..a36ca37 100644 (file)
@@ -1111,7 +1111,8 @@ static int i915_execbuffer(struct drm_device *dev, void *data,
        sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv);
 
        /* fence */
-       ret = drm_fence_buffer_objects(dev, NULL, 0, NULL, &fence);
+       ret = drm_fence_buffer_objects(dev, NULL, fence_arg->flags, 
+                                      NULL, &fence);
        if (ret)
                goto out_err0;