diff options
-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 | } |