GEM Submission

GEM Submission — Helpers for determining submission method

Functions

Types and Values

Description

This helper library contains functions used for getting information on currently used hardware submission method. Different generations of hardware support different submission backends, currently we're distinguishing 3 different methods: legacy ringbuffer submission, execlists, GuC submission. For legacy ringbuffer submission, there's also a variation where we're using semaphores for synchronization between engines.

Functions

gem_submission_method ()

unsigned
gem_submission_method (int fd);

Parameters

fd

open i915 drm file descriptor

 

Returns

Submission method bitmap.


gem_submission_print_method ()

void
gem_submission_print_method (int fd);

Helper for pretty-printing currently used submission method

Parameters

fd

open i915 drm file descriptor

 

gem_has_semaphores ()

bool
gem_has_semaphores (int fd);

Feature test macro to query whether the driver is using semaphores for synchronization between engines.

Parameters

fd

open i915 drm file descriptor

 

gem_has_execlists ()

bool
gem_has_execlists (int fd);

Feature test macro to query whether the driver is using execlists as a hardware submission method.

Parameters

fd

open i915 drm file descriptor

 

gem_has_guc_submission ()

bool
gem_has_guc_submission (int fd);

Feature test macro to query whether the driver is using the GuC as a hardware submission method.

Parameters

fd

open i915 drm file descriptor

 

gem_engine_has_mutable_submission ()

bool
gem_engine_has_mutable_submission (int fd,
                                   unsigned int engine);

Returns boolean value if the engine allows batch modifications post execbuf.

Parameters

i915

open i915 drm file descriptor

 

engine

the engine (I915_EXEC_RING id) of target

 

gem_class_has_mutable_submission ()

bool
gem_class_has_mutable_submission (int fd,
                                  int class);

Returns boolean value if the engine class allows batch modifications post execbuf.

Parameters

i915

open i915 drm file descriptor

 

class

engine class

 

gem_cmdparser_version ()

int
gem_cmdparser_version (int i915,
                       uint32_t engine);

gem_require_blitter ()

void
gem_require_blitter (int i915);

gem_test_engine ()

void
gem_test_engine (int fd,
                 unsigned int engine);

Execute a nop batch on the engine specified, or ALL_ENGINES for all, and check it executes.

Parameters

i915

open i915 drm file descriptor

 

engine

the engine (I915_EXEC_RING id) to exercise

 

gem_reopen_driver ()

int
gem_reopen_driver (int fd);

Re-opens the drm fd which is useful in instances where a clean default context is needed.

Parameters

fd

re-open the i915 drm file descriptor

 

Types and Values

GEM_SUBMISSION_SEMAPHORES

#define GEM_SUBMISSION_SEMAPHORES (1 << 0)

GEM_SUBMISSION_EXECLISTS

#define GEM_SUBMISSION_EXECLISTS (1 << 1)

GEM_SUBMISSION_GUC

#define GEM_SUBMISSION_GUC		(1 << 2)