|
@@ -49,13 +49,7 @@ static int __intel_ring_space(int head, int tail, int size)
|
|
|
|
|
|
void intel_ring_update_space(struct intel_ring *ring)
|
|
void intel_ring_update_space(struct intel_ring *ring)
|
|
{
|
|
{
|
|
- if (ring->last_retired_head != -1) {
|
|
|
|
- ring->head = ring->last_retired_head;
|
|
|
|
- ring->last_retired_head = -1;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- ring->space = __intel_ring_space(ring->head & HEAD_ADDR,
|
|
|
|
- ring->tail, ring->size);
|
|
|
|
|
|
+ ring->space = __intel_ring_space(ring->head, ring->tail, ring->size);
|
|
}
|
|
}
|
|
|
|
|
|
static int
|
|
static int
|
|
@@ -618,12 +612,8 @@ static void reset_ring_common(struct intel_engine_cs *engine,
|
|
}
|
|
}
|
|
|
|
|
|
/* If the rq hung, jump to its breadcrumb and skip the batch */
|
|
/* If the rq hung, jump to its breadcrumb and skip the batch */
|
|
- if (request->fence.error == -EIO) {
|
|
|
|
- struct intel_ring *ring = request->ring;
|
|
|
|
-
|
|
|
|
- ring->head = request->postfix;
|
|
|
|
- ring->last_retired_head = -1;
|
|
|
|
- }
|
|
|
|
|
|
+ if (request->fence.error == -EIO)
|
|
|
|
+ request->ring->head = request->postfix;
|
|
} else {
|
|
} else {
|
|
engine->legacy_active_context = NULL;
|
|
engine->legacy_active_context = NULL;
|
|
}
|
|
}
|
|
@@ -1392,7 +1382,6 @@ intel_engine_create_ring(struct intel_engine_cs *engine, int size)
|
|
if (IS_I830(engine->i915) || IS_I845G(engine->i915))
|
|
if (IS_I830(engine->i915) || IS_I845G(engine->i915))
|
|
ring->effective_size -= 2 * CACHELINE_BYTES;
|
|
ring->effective_size -= 2 * CACHELINE_BYTES;
|
|
|
|
|
|
- ring->last_retired_head = -1;
|
|
|
|
intel_ring_update_space(ring);
|
|
intel_ring_update_space(ring);
|
|
|
|
|
|
vma = intel_ring_create_vma(engine->i915, size);
|
|
vma = intel_ring_create_vma(engine->i915, size);
|
|
@@ -1571,10 +1560,8 @@ void intel_legacy_submission_resume(struct drm_i915_private *dev_priv)
|
|
struct intel_engine_cs *engine;
|
|
struct intel_engine_cs *engine;
|
|
enum intel_engine_id id;
|
|
enum intel_engine_id id;
|
|
|
|
|
|
- for_each_engine(engine, dev_priv, id) {
|
|
|
|
|
|
+ for_each_engine(engine, dev_priv, id)
|
|
engine->buffer->head = engine->buffer->tail;
|
|
engine->buffer->head = engine->buffer->tail;
|
|
- engine->buffer->last_retired_head = -1;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
static int ring_request_alloc(struct drm_i915_gem_request *request)
|
|
static int ring_request_alloc(struct drm_i915_gem_request *request)
|