drm/i915: Don't skip request retirement if the active list is empty
[deliverable/linux.git] / drivers / gpu / drm / i915 / i915_gem.c
index d07c0b1fb498264ba0f6224db81434e98c7c6ff5..851b585987f9aebeaff662844f5d5d356bbc5e6f 100644 (file)
@@ -2377,10 +2377,11 @@ int __i915_add_request(struct intel_engine_cs *ring,
                ret = ring->add_request(ring);
                if (ret)
                        return ret;
+
+               request->tail = intel_ring_get_tail(ringbuf);
        }
 
        request->head = request_start;
-       request->tail = intel_ring_get_tail(ringbuf);
 
        /* Whilst this request exists, batch_obj will be on the
         * active_list, and so will hold the active reference. Only when this
@@ -2655,9 +2656,6 @@ void i915_gem_reset(struct drm_device *dev)
 void
 i915_gem_retire_requests_ring(struct intel_engine_cs *ring)
 {
-       if (list_empty(&ring->request_list))
-               return;
-
        WARN_ON(i915_verify_lists(ring->dev));
 
        /* Retire requests first as we use it above for the early return.
This page took 0.03467 seconds and 5 git commands to generate.