Commit 18991845 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/i915: Remove the unsightly "optimisation" from flush_fence()

As i915_wait_request() will first check for an already passed seqno,
doing it also in the caller is a waste of space for a cold path.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 8fe301ad
......@@ -2280,11 +2280,6 @@ static int i830_write_fence_reg(struct drm_i915_gem_object *obj)
return 0;
}
static bool ring_passed_seqno(struct intel_ring_buffer *ring, u32 seqno)
{
return i915_seqno_passed(ring->get_seqno(ring), seqno);
}
static int
i915_gem_object_flush_fence(struct drm_i915_gem_object *obj)
{
......@@ -2302,14 +2297,11 @@ i915_gem_object_flush_fence(struct drm_i915_gem_object *obj)
}
if (obj->last_fenced_seqno) {
if (!ring_passed_seqno(obj->ring,
obj->last_fenced_seqno)) {
ret = i915_wait_request(obj->ring,
obj->last_fenced_seqno,
true);
if (ret)
return ret;
}
ret = i915_wait_request(obj->ring,
obj->last_fenced_seqno,
true);
if (ret)
return ret;
obj->last_fenced_seqno = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment