XenevaOS
Loading...
Searching...
No Matches
Public Attributes | List of all members
drm_i915_gem_busy Struct Reference

#include <i915_drm.h>

Public Attributes

__u32 handle
 
__u32 busy
 

Member Data Documentation

◆ busy

__u32 drm_i915_gem_busy::busy

Return busy status

A return of 0 implies that the object is idle (after having flushed any pending activity), and a non-zero return that the object is still in-flight on the GPU. (The GPU has not yet signaled completion for all pending requests that reference the object.) An object is guaranteed to become idle eventually (so long as no new GPU commands are executed upon it). Due to the asynchronous nature of the hardware, an object reported as busy may become idle before the ioctl is completed.

Furthermore, if the object is busy, which engine is busy is only provided as a guide and only indirectly by reporting its class (there may be more than one engine in each class). There are race conditions which prevent the report of which engines are busy from being always accurate. However, the converse is not true. If the object is idle, the result of the ioctl, that all engines are idle, is accurate.

The returned dword is split into two fields to indicate both the engine classes on which the object is being read, and the engine class on which it is currently being written (if any).

The low word (bits 0:15) indicate if the object is being written to by any engine (there can only be one, as the GEM implicit synchronisation rules force writes to be serialised). Only the engine class (offset by 1, I915_ENGINE_CLASS_RENDER is reported as 1 not 0 etc) for the last write is reported.

The high word (bits 16:31) are a bitmask of which engines classes are currently reading from the object. Multiple engines may be reading from the object simultaneously.

The value of each engine class is the same as specified in the I915_CONTEXT_PARAM_ENGINES context parameter and via perf, i.e. I915_ENGINE_CLASS_RENDER, I915_ENGINE_CLASS_COPY, etc. Some hardware may have parallel execution engines, e.g. multiple media engines, which are mapped to the same class identifier and so are not separately reported for busyness.

Caveat emptor: Only the boolean result of this query is reliable; that is whether the object is idle or busy. The report of which engines are busy should be only used as a heuristic.

◆ handle

__u32 drm_i915_gem_busy::handle

Handle of the buffer to check for busy


The documentation for this struct was generated from the following file: