Top |
uint32_t | gem_context_create () |
void | gem_context_destroy () |
bool | gem_has_contexts () |
void | gem_require_contexts () |
void | gem_context_require_bannable () |
void | gem_context_require_param () |
void | gem_context_get_param () |
void | gem_context_set_param () |
void | gem_context_set_priority () |
This helper library contains functions used for handling gem contexts. Conceptually, gem contexts are similar to their CPU counterparts, in that they are a mix of software and hardware features allowing to isolate some aspects of task execution. Initially it was just a matter of maintaining separate state for each context, but more features were added, some improving contexts isolation (per-context address space), some are just software features improving submission model (context priority).
uint32_t
gem_context_create (int fd
);
This wraps the CONTEXT_CREATE ioctl, which is used to allocate a new
context. Note that similarly to gem_set_caching()
this wrapper skips on
kernels and platforms where context support is not available.
void gem_context_destroy (int fd
,uint32_t ctx_id
);
This wraps the CONTEXT_DESTROY ioctl, which is used to free a context.
bool
gem_has_contexts (int fd
);
Queries whether context creation is supported or not.
void
gem_require_contexts (int fd
);
This helper will automatically skip the test on platforms where context support is not available.
void gem_context_require_param (int fd
,uint64_t param
);
Feature test macro to query whether context parameter support for param
is available. Automatically skips through igt_require()
if not.
void gem_context_get_param (int fd
,struct drm_i915_gem_context_param *p
);
This wraps the CONTEXT_GET_PARAM ioctl, which is used to get a context parameter.
void gem_context_set_param (int fd
,struct drm_i915_gem_context_param *p
);
This wraps the CONTEXT_SET_PARAM ioctl, which is used to set a context parameter.
void gem_context_set_priority (int fd
,uint32_t ctx
,int prio
);
Like __gem_context_set_priority()
, except we assert on failure.