drm/i915: Remove obsolete seqno parameter from 'i915_add_request'
authorJohn Harrison <John.C.Harrison@Intel.com>
Mon, 24 Nov 2014 18:49:36 +0000 (18:49 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 3 Dec 2014 08:35:19 +0000 (09:35 +0100)
There is no longer any need to retrieve a seqno value from an i915_add_request()
call. The calling code already knows which request structure is being processed
(it can only be ring->OLR). And as the request itself is now used in preference
to the basic seqno value, the latter is now redundant in this situation.

For: VIZ-4377
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Thomas Daniel <Thomas.Daniel@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_gem_render_state.c
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_overlay.c
drivers/gpu/drm/i915/intel_ringbuffer.c

index 69a0e00039c67726ce53c41fe4d819c4e4c3d553..d4e1fa757a34e45a8ceee1478d89a781cc94fbd5 100644 (file)
@@ -2621,10 +2621,9 @@ int __must_check i915_gpu_idle(struct drm_device *dev);
 int __must_check i915_gem_suspend(struct drm_device *dev);
 int __i915_add_request(struct intel_engine_cs *ring,
                       struct drm_file *file,
-                      struct drm_i915_gem_object *batch_obj,
-                      u32 *seqno);
-#define i915_add_request(ring, seqno) \
-       __i915_add_request(ring, NULL, NULL, seqno)
+                      struct drm_i915_gem_object *batch_obj);
+#define i915_add_request(ring) \
+       __i915_add_request(ring, NULL, NULL)
 int __i915_wait_request(struct drm_i915_gem_request *req,
                        unsigned reset_counter,
                        bool interruptible,
index 3f56f50900bd95764a0db0983d7a0f2fdab52cfb..c403bacee1615127a6f28fd8094f8b1f3318a881 100644 (file)
@@ -1164,7 +1164,7 @@ i915_gem_check_olr(struct drm_i915_gem_request *req)
 
        ret = 0;
        if (req == req->ring->outstanding_lazy_request)
-               ret = i915_add_request(req->ring, NULL);
+               ret = i915_add_request(req->ring);
 
        return ret;
 }
@@ -2412,8 +2412,7 @@ i915_gem_get_seqno(struct drm_device *dev, u32 *seqno)
 
 int __i915_add_request(struct intel_engine_cs *ring,
                       struct drm_file *file,
-                      struct drm_i915_gem_object *obj,
-                      u32 *out_seqno)
+                      struct drm_i915_gem_object *obj)
 {
        struct drm_i915_private *dev_priv = ring->dev->dev_private;
        struct drm_i915_gem_request *request;
@@ -2512,8 +2511,6 @@ int __i915_add_request(struct intel_engine_cs *ring,
                           round_jiffies_up_relative(HZ));
        intel_mark_busy(dev_priv->dev);
 
-       if (out_seqno)
-               *out_seqno = request->seqno;
        return 0;
 }
 
index 7ecfa918e114ee3bf36c687f5e90c5c063515f06..faada754405083249a11e55e0a4b88882eb5c054 100644 (file)
@@ -993,7 +993,7 @@ i915_gem_execbuffer_retire_commands(struct drm_device *dev,
        ring->gpu_caches_dirty = true;
 
        /* Add a breadcrumb for the completion of the batch buffer */
-       (void)__i915_add_request(ring, file, obj, NULL);
+       (void)__i915_add_request(ring, file, obj);
 }
 
 static int
index 98dcd94acba8f25a360f0e03f0c67b874fe3a72a..521548a08578231334f95560c7ad79d3339dd5b9 100644 (file)
@@ -173,7 +173,7 @@ int i915_gem_render_state_init(struct intel_engine_cs *ring)
 
        i915_vma_move_to_active(i915_gem_obj_to_ggtt(so.obj), ring);
 
-       ret = __i915_add_request(ring, NULL, so.obj, NULL);
+       ret = __i915_add_request(ring, NULL, so.obj);
        /* __i915_add_request moves object to inactive if it fails */
 out:
        i915_gem_render_state_fini(&so);
index 8d0b8ac2748a4998ec429079a117bb0a4461509c..1ed25a120159c35a18f74723243c9e8a4015c0b9 100644 (file)
@@ -1628,7 +1628,7 @@ int intel_lr_context_render_state_init(struct intel_engine_cs *ring,
 
        i915_vma_move_to_active(i915_gem_obj_to_ggtt(so.obj), ring);
 
-       ret = __i915_add_request(ring, file, so.obj, NULL);
+       ret = __i915_add_request(ring, file, so.obj);
        /* intel_logical_ring_add_request moves object to inactive if it
         * fails */
 out:
index 6c530e298b649be411048036e4601b420248147b..c1abf49ea5b85e1a136c5494b43bea55636eaa33 100644 (file)
@@ -219,7 +219,7 @@ static int intel_overlay_do_wait_request(struct intel_overlay *overlay,
        BUG_ON(overlay->last_flip_req);
        i915_gem_request_assign(&overlay->last_flip_req,
                                             ring->outstanding_lazy_request);
-       ret = i915_add_request(ring, NULL);
+       ret = i915_add_request(ring);
        if (ret)
                return ret;
 
@@ -291,7 +291,7 @@ static int intel_overlay_continue(struct intel_overlay *overlay,
        WARN_ON(overlay->last_flip_req);
        i915_gem_request_assign(&overlay->last_flip_req,
                                             ring->outstanding_lazy_request);
-       return i915_add_request(ring, NULL);
+       return i915_add_request(ring);
 }
 
 static void intel_overlay_release_old_vid_tail(struct intel_overlay *overlay)
index b9d0d29f83430a3ef7069d61d212bc7360b1bb71..abdaafd73c77dc07beb7aabe852c22b7ed2406a9 100644 (file)
@@ -2014,7 +2014,7 @@ int intel_ring_idle(struct intel_engine_cs *ring)
 
        /* We need to add any requests required to flush the objects and ring */
        if (ring->outstanding_lazy_request) {
-               ret = i915_add_request(ring, NULL);
+               ret = i915_add_request(ring);
                if (ret)
                        return ret;
        }