GEM Scheduler: igt-gpu-tools Reference Manual

## GEM Scheduler GEM Scheduler — Helpers for querying scheduler capabilities |

## Functions

unsigned | gem_scheduler_capability ()
bool | gem_scheduler_enabled ()
bool | gem_scheduler_has_ctx_priority ()
bool | gem_scheduler_has_static_priority ()
bool | gem_scheduler_has_preemption ()
bool | gem_scheduler_has_semaphores ()
bool | gem_scheduler_has_engine_busy_stats ()
bool | gem_scheduler_has_timeslicing ()
void | gem_scheduler_print_capability ()

## Description

This helper library contains functions used for getting information on currently used scheduling model.

## Functions

### gem_scheduler_capability ()

    unsigned
    gem_scheduler_capability (int fd);

#### Parameters

fd | open i915 drm file descriptor |

#### Returns

Scheduler capability bitmap.

### gem_scheduler_enabled ()

    bool
    gem_scheduler_enabled (int fd);

Feature test macro to query whether the driver has scheduling capability.

#### Parameters

fd | open i915 drm file descriptor |

### gem_scheduler_has_ctx_priority ()

    bool
    gem_scheduler_has_ctx_priority (int fd);

Feature test macro to query whether the driver supports assigning custom priorities to contexts from userspace.

#### Parameters

fd | open i915 drm file descriptor |

### gem_scheduler_has_static_priority ()

    bool
    gem_scheduler_has_static_priority (int fd);

Feature test macro to query whether the driver supports priority assigned from user space are statically mapping into 3 buckets.

#### Parameters

fd | open i915 drm file descriptor |

### gem_scheduler_has_preemption ()

    bool
    gem_scheduler_has_preemption (int fd);

Feature test macro to query whether the driver supports preempting active (currently executing on HW) workloads.

#### Parameters

fd | open i915 drm file descriptor |

### gem_scheduler_has_semaphores ()

    bool
    gem_scheduler_has_semaphores (int fd);

Feature test macro to query whether the driver supports using HW semaphores to schedule dependencies in parallel (using the HW to delay execution until ready to reduce latency).

#### Parameters

fd | open i915 drm file descriptor |

### gem_scheduler_has_engine_busy_stats ()

    bool
    gem_scheduler_has_engine_busy_stats (int fd);

Feature test macro to query whether the driver supports reporting accurate per-engine utilisation.

#### Parameters

fd | open i915 drm file descriptor |

### gem_scheduler_has_timeslicing ()

    bool
    gem_scheduler_has_timeslicing (int fd);

Feature test macro to query whether the driver supports using HW preemption to implement timeslicing of userspace batches. This allows userspace to implement micro-level scheduling within their own batches.

#### Parameters

fd | open i915 drm file descriptor |

### gem_scheduler_print_capability ()

    void
    gem_scheduler_print_capability (int fd);

Helper for pretty-printing scheduler capability.

#### Parameters

fd | open i915 drm file descriptor |