Lines Matching full:request
45 struct i915_request *request; member
60 * Request queue structure.
62 * The request queue allows us to note sequence numbers that have been emitted
67 * emission time to be associated with the request for tracking how far ahead
83 /** On Which ring this request was generated */
87 * Context and ring buffer related to this request
88 * Contexts are refcounted, so when this request is associated with a
90 * it persists while any request is linked to it. Requests themselves
91 * are also refcounted, so the request will only be freed when the last
104 * Fences for the various phases in the request's lifetime.
106 * The submit fence is used to await upon all of the request's
107 * dependencies. When it is signaled, the request is ready to run.
108 * It is used by the driver to then queue the request for execution.
119 * dependency tree for the lifetime of the request (from execbuf
121 * request not tied to individual fences.
127 * GEM sequence number associated with this request on the
128 * global execution timeline. It is zero when the request is not
134 /** Position in the ring of the start of the request */
147 /** Position in the ring of the end of the whole request */
153 /** Preallocate space in the ring for the emitting the request */
156 /** Batch buffer related to this request if any (used for
164 * on the active_list (of their final request).
169 /** Time at which this request was emitted, in jiffies. */
174 /** engine->request_list entry for this request */
177 /** ring->request_list entry for this request */
181 /** file_priv list entry for this request */
202 /* We assume that NULL fence/request are interoperable */ in to_request()
228 * @request - the request
230 * A request is assigned a global seqno only when it is on the hardware
238 * value to change between reads. Only when the request is complete can
245 i915_request_global_seqno(const struct i915_request *request) in i915_request_global_seqno() argument
247 return READ_ONCE(request->global_seqno); in i915_request_global_seqno()
258 void __i915_request_submit(struct i915_request *request);
259 void i915_request_submit(struct i915_request *request);
261 void i915_request_skip(struct i915_request *request, int error);
263 void __i915_request_unsubmit(struct i915_request *request);
264 void i915_request_unsubmit(struct i915_request *request);
343 * retirement order) request relevant for the desired mode of access.
345 * most recent fence request, typically this is done as part of
350 * itself as idle (i915_gem_active.request == NULL). The owner
360 struct i915_request __rcu *request; member
366 struct i915_request *request);
375 * an activity tracker, that is for tracking the last known active request
376 * associated with it. When the last request becomes idle, when it is retired
383 RCU_INIT_POINTER(active->request, NULL); in init_request_active()
389 * i915_gem_active_set - updates the tracker to watch the current request
391 * @request - the request to watch
393 * i915_gem_active_set() watches the given @request for completion. Whilst
394 * that @request is busy, the @active reports busy. When that @request is
399 struct i915_request *request) in i915_gem_active_set() argument
401 list_move(&active->link, &request->active_list); in i915_gem_active_set()
402 rcu_assign_pointer(active->request, request); in i915_gem_active_set()
408 * @fn - the routine called when the request is retired
412 * is called when the final request associated with the @active tracker
434 return rcu_dereference_protected(active->request, 1); in __i915_gem_active_peek()
438 * i915_gem_active_raw - return the active request
441 * i915_gem_active_raw() returns the current request being tracked, or NULL.
442 * It does not obtain a reference on the request for the caller, so the caller
448 return rcu_dereference_protected(active->request, in i915_gem_active_raw()
453 * i915_gem_active_peek - report the active request being monitored
456 * i915_gem_active_peek() returns the current request being tracked if
457 * still active, or NULL. It does not obtain a reference on the request
463 struct i915_request *request; in i915_gem_active_peek() local
465 request = i915_gem_active_raw(active, mutex); in i915_gem_active_peek()
466 if (!request || i915_request_completed(request)) in i915_gem_active_peek()
469 return request; in i915_gem_active_peek()
473 * i915_gem_active_get - return a reference to the active request
476 * i915_gem_active_get() returns a reference to the active request, or NULL
486 * __i915_gem_active_get_rcu - return a reference to the active request
489 * __i915_gem_active_get() returns a reference to the active request, or NULL
497 * Performing a lockless retrieval of the active request is super in __i915_gem_active_get_rcu()
499 * slab of request objects will not be freed whilst we hold the in __i915_gem_active_get_rcu()
500 * RCU read lock. It does not guarantee that the request itself in __i915_gem_active_get_rcu()
505 * rq = active.request in __i915_gem_active_get_rcu()
508 * active.request = NULL in __i915_gem_active_get_rcu()
513 * To prevent the request from being reused whilst the caller in __i915_gem_active_get_rcu()
516 * (refcnt == 0). That prevents the request being reallocated in __i915_gem_active_get_rcu()
517 * whilst the caller holds on to it. To check that the request in __i915_gem_active_get_rcu()
519 * check that our request remains the active request across in __i915_gem_active_get_rcu()
524 * In the middle of all that, we inspect whether the request is in __i915_gem_active_get_rcu()
525 * complete. Retiring is lazy so the request may be completed long in __i915_gem_active_get_rcu()
527 * request is complete is far cheaper (as it involves no locked in __i915_gem_active_get_rcu()
531 * seqno nor HWS is the right one! However, if the request was in __i915_gem_active_get_rcu()
532 * reallocated, that means the active tracker's request was complete. in __i915_gem_active_get_rcu()
533 * If the new request is also complete, then both are and we can in __i915_gem_active_get_rcu()
534 * just report the active tracker is idle. If the new request is in __i915_gem_active_get_rcu()
536 * it remained the active request. in __i915_gem_active_get_rcu()
538 * It is then imperative that we do not zero the request on in __i915_gem_active_get_rcu()
543 struct i915_request *request; in __i915_gem_active_get_rcu() local
545 request = rcu_dereference(active->request); in __i915_gem_active_get_rcu()
546 if (!request || i915_request_completed(request)) in __i915_gem_active_get_rcu()
552 * re-emit the load for request->fence.seqno. A race would catch in __i915_gem_active_get_rcu()
563 request = i915_request_get_rcu(request); in __i915_gem_active_get_rcu()
569 * the request, we may not notice a change in the active in __i915_gem_active_get_rcu()
584 * returns the request (and so with the reference counted in __i915_gem_active_get_rcu()
587 * that this request is the one currently being tracked. in __i915_gem_active_get_rcu()
592 if (!request || request == rcu_access_pointer(active->request)) in __i915_gem_active_get_rcu()
593 return rcu_pointer_handoff(request); in __i915_gem_active_get_rcu()
595 i915_request_put(request); in __i915_gem_active_get_rcu()
600 * i915_gem_active_get_unlocked - return a reference to the active request
603 * i915_gem_active_get_unlocked() returns a reference to the active request,
612 struct i915_request *request; in i915_gem_active_get_unlocked() local
615 request = __i915_gem_active_get_rcu(active); in i915_gem_active_get_unlocked()
618 return request; in i915_gem_active_get_unlocked()
626 * assigned to a request. Due to the lazy retiring, that request may be idle
632 return rcu_access_pointer(active->request); in i915_gem_active_isset()
636 * i915_gem_active_wait - waits until the request is completed
637 * @active - the active request on which to wait
642 * i915_gem_active_wait() waits until the request is completed before
647 * request without holding any locks. See __i915_gem_active_get_rcu() for the
649 * can then wait upon the request, and afterwards release our reference,
660 struct i915_request *request; in i915_gem_active_wait() local
663 request = i915_gem_active_get_unlocked(active); in i915_gem_active_wait()
664 if (request) { in i915_gem_active_wait()
665 ret = i915_request_wait(request, flags, MAX_SCHEDULE_TIMEOUT); in i915_gem_active_wait()
666 i915_request_put(request); in i915_gem_active_wait()
673 * i915_gem_active_retire - waits until the request is retired
674 * @active - the active request on which to wait
676 * i915_gem_active_retire() waits until the request is completed,
685 struct i915_request *request; in i915_gem_active_retire() local
688 request = i915_gem_active_raw(active, mutex); in i915_gem_active_retire()
689 if (!request) in i915_gem_active_retire()
692 ret = i915_request_wait(request, in i915_gem_active_retire()
699 RCU_INIT_POINTER(active->request, NULL); in i915_gem_active_retire()
701 active->retire(active, request); in i915_gem_active_retire()