drm/i915: Remove i915_request.global_seqno
Having weaned the interrupt handling off using a single global execution queue, we no longer need to emit a global_seqno. Note that we still have a few assumptions about execution order along engine timelines, but this removes the most obvious artefact! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190226094922.31617-3-chris@chris-wilson.co.uk
This commit is contained in:
@@ -147,14 +147,6 @@ struct i915_request {
|
||||
*/
|
||||
const u32 *hwsp_seqno;
|
||||
|
||||
/**
|
||||
* GEM sequence number associated with this request on the
|
||||
* global execution timeline. It is zero when the request is not
|
||||
* on the HW queue (i.e. not on the engine timeline list).
|
||||
* Its value is guarded by the timeline spinlock.
|
||||
*/
|
||||
u32 global_seqno;
|
||||
|
||||
/** Position in the ring of the start of the request */
|
||||
u32 head;
|
||||
|
||||
@@ -247,30 +239,6 @@ i915_request_put(struct i915_request *rq)
|
||||
dma_fence_put(&rq->fence);
|
||||
}
|
||||
|
||||
/**
|
||||
* i915_request_global_seqno - report the current global seqno
|
||||
* @request - the request
|
||||
*
|
||||
* A request is assigned a global seqno only when it is on the hardware
|
||||
* execution queue. The global seqno can be used to maintain a list of
|
||||
* requests on the same engine in retirement order, for example for
|
||||
* constructing a priority queue for waiting. Prior to its execution, or
|
||||
* if it is subsequently removed in the event of preemption, its global
|
||||
* seqno is zero. As both insertion and removal from the execution queue
|
||||
* may operate in IRQ context, it is not guarded by the usual struct_mutex
|
||||
* BKL. Instead those relying on the global seqno must be prepared for its
|
||||
* value to change between reads. Only when the request is complete can
|
||||
* the global seqno be stable (due to the memory barriers on submitting
|
||||
* the commands to the hardware to write the breadcrumb, if the HWS shows
|
||||
* that it has passed the global seqno and the global seqno is unchanged
|
||||
* after the read, it is indeed complete).
|
||||
*/
|
||||
static inline u32
|
||||
i915_request_global_seqno(const struct i915_request *request)
|
||||
{
|
||||
return READ_ONCE(request->global_seqno);
|
||||
}
|
||||
|
||||
int i915_request_await_object(struct i915_request *to,
|
||||
struct drm_i915_gem_object *obj,
|
||||
bool write);
|
||||
|
Reference in New Issue
Block a user