Skip to content

Commit

Permalink
drm/i915: Remove explicit flush from i915_gem_object_flush_fence()
Browse files Browse the repository at this point in the history
As the flush is either performed explictly immediately after the
execbuffer dispatch, or before the serialisation of last_fenced_seqno we
can forgo the explict i915_gem_flush_ring().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Jul 25, 2012
1 parent 69c2fc8 commit 86d5bc3
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2473,21 +2473,8 @@ static void i915_gem_object_update_fence(struct drm_i915_gem_object *obj,
static int
i915_gem_object_flush_fence(struct drm_i915_gem_object *obj)
{
int ret;

if (obj->fenced_gpu_access) {
if (obj->base.write_domain & I915_GEM_GPU_DOMAINS) {
ret = i915_gem_flush_ring(obj->ring,
0, obj->base.write_domain);
if (ret)
return ret;
}

obj->fenced_gpu_access = false;
}

if (obj->last_fenced_seqno) {
ret = i915_wait_seqno(obj->ring, obj->last_fenced_seqno);
int ret = i915_wait_seqno(obj->ring, obj->last_fenced_seqno);
if (ret)
return ret;

Expand All @@ -2500,6 +2487,7 @@ i915_gem_object_flush_fence(struct drm_i915_gem_object *obj)
if (obj->base.read_domains & I915_GEM_DOMAIN_GTT)
mb();

obj->fenced_gpu_access = false;
return 0;
}

Expand Down

0 comments on commit 86d5bc3

Please sign in to comment.