|
XenevaOS
|
#include <xe_drm.h>

Public Attributes | |
| struct drm_xe_engine_class_instance | eci |
| __s32 | clockid |
| __u32 | width |
| __u64 | engine_cycles |
| __u64 | cpu_timestamp |
| __u64 | cpu_delta |
struct drm_xe_query_engine_cycles - correlate CPU and GPU timestamps
If a query is made with a struct drm_xe_device_query where .query is equal to DRM_XE_DEVICE_QUERY_ENGINE_CYCLES, then the reply uses struct drm_xe_query_engine_cycles in .data. struct drm_xe_query_engine_cycles is allocated by the user and .data points to this allocated structure.
The query returns the engine cycles, which along with GT's @reference_clock, can be used to calculate the engine timestamp. In addition the query returns a set of cpu timestamps that indicate when the command streamer cycle count was captured.
| __s32 drm_xe_query_engine_cycles::clockid |
@clockid: This is input by the user and is the reference clock id for CPU timestamp. For definition, see clock_gettime(2) and perf_event_open(2). Supported clock ids are CLOCK_MONOTONIC, CLOCK_MONOTONIC_RAW, CLOCK_REALTIME, CLOCK_BOOTTIME, CLOCK_TAI.
| __u64 drm_xe_query_engine_cycles::cpu_delta |
@cpu_delta: Time delta in ns captured around reading the lower dword of the engine_cycles register.
| __u64 drm_xe_query_engine_cycles::cpu_timestamp |
@cpu_timestamp: CPU timestamp in ns. The timestamp is captured before reading the engine_cycles register using the reference clockid set by the user.
| struct drm_xe_engine_class_instance drm_xe_query_engine_cycles::eci |
@eci: This is input by the user and is the engine for which command streamer cycles is queried.
| __u64 drm_xe_query_engine_cycles::engine_cycles |
@engine_cycles: Engine cycles as read from its register at 0x358 offset.
| __u32 drm_xe_query_engine_cycles::width |
@width: Width of the engine cycle counter in bits.