diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-17 10:31:29 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-04-18 07:23:17 -0400 |
commit | 1899184547dec95ec8b7eb00e202d9b3a3b1c87b (patch) | |
tree | 1b52611ddb6b6d6bc3a59f13948683480c28ac81 | |
parent | 8fe301add51206ca53576471059393b925f30124 (diff) |
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: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index f7cd3461dc4f..bac3570d2c47 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -2280,11 +2280,6 @@ static int i830_write_fence_reg(struct drm_i915_gem_object *obj) | |||
2280 | return 0; | 2280 | return 0; |
2281 | } | 2281 | } |
2282 | 2282 | ||
2283 | static bool ring_passed_seqno(struct intel_ring_buffer *ring, u32 seqno) | ||
2284 | { | ||
2285 | return i915_seqno_passed(ring->get_seqno(ring), seqno); | ||
2286 | } | ||
2287 | |||
2288 | static int | 2283 | static int |
2289 | i915_gem_object_flush_fence(struct drm_i915_gem_object *obj) | 2284 | i915_gem_object_flush_fence(struct drm_i915_gem_object *obj) |
2290 | { | 2285 | { |
@@ -2302,14 +2297,11 @@ i915_gem_object_flush_fence(struct drm_i915_gem_object *obj) | |||
2302 | } | 2297 | } |
2303 | 2298 | ||
2304 | if (obj->last_fenced_seqno) { | 2299 | if (obj->last_fenced_seqno) { |
2305 | if (!ring_passed_seqno(obj->ring, | 2300 | ret = i915_wait_request(obj->ring, |
2306 | obj->last_fenced_seqno)) { | 2301 | obj->last_fenced_seqno, |
2307 | ret = i915_wait_request(obj->ring, | 2302 | true); |
2308 | obj->last_fenced_seqno, | 2303 | if (ret) |
2309 | true); | 2304 | return ret; |
2310 | if (ret) | ||
2311 | return ret; | ||
2312 | } | ||
2313 | 2305 | ||
2314 | obj->last_fenced_seqno = 0; | 2306 | obj->last_fenced_seqno = 0; |
2315 | } | 2307 | } |