drm/i915: Remove obsolete seqno parameter from 'i915_add_request'
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>
This commit is contained in:
parent
9c65481829
commit
9400ae5c82
@ -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 __must_check i915_gem_suspend(struct drm_device *dev);
|
||||||
int __i915_add_request(struct intel_engine_cs *ring,
|
int __i915_add_request(struct intel_engine_cs *ring,
|
||||||
struct drm_file *file,
|
struct drm_file *file,
|
||||||
struct drm_i915_gem_object *batch_obj,
|
struct drm_i915_gem_object *batch_obj);
|
||||||
u32 *seqno);
|
#define i915_add_request(ring) \
|
||||||
#define i915_add_request(ring, seqno) \
|
__i915_add_request(ring, NULL, NULL)
|
||||||
__i915_add_request(ring, NULL, NULL, seqno)
|
|
||||||
int __i915_wait_request(struct drm_i915_gem_request *req,
|
int __i915_wait_request(struct drm_i915_gem_request *req,
|
||||||
unsigned reset_counter,
|
unsigned reset_counter,
|
||||||
bool interruptible,
|
bool interruptible,
|
||||||
|
@ -1164,7 +1164,7 @@ i915_gem_check_olr(struct drm_i915_gem_request *req)
|
|||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
if (req == req->ring->outstanding_lazy_request)
|
if (req == req->ring->outstanding_lazy_request)
|
||||||
ret = i915_add_request(req->ring, NULL);
|
ret = i915_add_request(req->ring);
|
||||||
|
|
||||||
return ret;
|
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,
|
int __i915_add_request(struct intel_engine_cs *ring,
|
||||||
struct drm_file *file,
|
struct drm_file *file,
|
||||||
struct drm_i915_gem_object *obj,
|
struct drm_i915_gem_object *obj)
|
||||||
u32 *out_seqno)
|
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = ring->dev->dev_private;
|
struct drm_i915_private *dev_priv = ring->dev->dev_private;
|
||||||
struct drm_i915_gem_request *request;
|
struct drm_i915_gem_request *request;
|
||||||
@ -2512,8 +2511,6 @@ int __i915_add_request(struct intel_engine_cs *ring,
|
|||||||
round_jiffies_up_relative(HZ));
|
round_jiffies_up_relative(HZ));
|
||||||
intel_mark_busy(dev_priv->dev);
|
intel_mark_busy(dev_priv->dev);
|
||||||
|
|
||||||
if (out_seqno)
|
|
||||||
*out_seqno = request->seqno;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -993,7 +993,7 @@ i915_gem_execbuffer_retire_commands(struct drm_device *dev,
|
|||||||
ring->gpu_caches_dirty = true;
|
ring->gpu_caches_dirty = true;
|
||||||
|
|
||||||
/* Add a breadcrumb for the completion of the batch buffer */
|
/* 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
|
static int
|
||||||
|
@ -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);
|
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 */
|
/* __i915_add_request moves object to inactive if it fails */
|
||||||
out:
|
out:
|
||||||
i915_gem_render_state_fini(&so);
|
i915_gem_render_state_fini(&so);
|
||||||
|
@ -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);
|
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
|
/* intel_logical_ring_add_request moves object to inactive if it
|
||||||
* fails */
|
* fails */
|
||||||
out:
|
out:
|
||||||
|
@ -219,7 +219,7 @@ static int intel_overlay_do_wait_request(struct intel_overlay *overlay,
|
|||||||
BUG_ON(overlay->last_flip_req);
|
BUG_ON(overlay->last_flip_req);
|
||||||
i915_gem_request_assign(&overlay->last_flip_req,
|
i915_gem_request_assign(&overlay->last_flip_req,
|
||||||
ring->outstanding_lazy_request);
|
ring->outstanding_lazy_request);
|
||||||
ret = i915_add_request(ring, NULL);
|
ret = i915_add_request(ring);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ static int intel_overlay_continue(struct intel_overlay *overlay,
|
|||||||
WARN_ON(overlay->last_flip_req);
|
WARN_ON(overlay->last_flip_req);
|
||||||
i915_gem_request_assign(&overlay->last_flip_req,
|
i915_gem_request_assign(&overlay->last_flip_req,
|
||||||
ring->outstanding_lazy_request);
|
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)
|
static void intel_overlay_release_old_vid_tail(struct intel_overlay *overlay)
|
||||||
|
@ -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 */
|
/* We need to add any requests required to flush the objects and ring */
|
||||||
if (ring->outstanding_lazy_request) {
|
if (ring->outstanding_lazy_request) {
|
||||||
ret = i915_add_request(ring, NULL);
|
ret = i915_add_request(ring);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user