Skip to content

Commit

Permalink
Add uAPI for slice shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
zxye committed Feb 12, 2019
1 parent 269853a commit dbffb5f
Showing 1 changed file with 56 additions and 1 deletion.
57 changes: 56 additions & 1 deletion media_driver/linux/common/os/i915/include/uapi/i915_drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1069,8 +1069,17 @@ struct drm_i915_gem_execbuffer2 {
* dma fences to wait upon or signal.
*/
#define I915_EXEC_FENCE_ARRAY (1<<19)
/*
*
* Setting I915_EXEC_FENCE_SUBMIT implies that lower_32_bits(rsvd2) represent
* a sync_file fd to wait upon (in a nonblocking manner) prior to executing
* the batch.
*
* Returns -EINVAL if the sync_file fd cannot be found.
*/
#define I915_EXEC_FENCE_SUBMIT (1<<20)

#define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_ARRAY<<1))
#define __I915_EXEC_UNKNOWN_FLAGS (-(I915_EXEC_FENCE_SUBMIT<<1))

#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
#define i915_execbuffer2_set_context_id(eb2, context) \
Expand Down Expand Up @@ -1478,9 +1487,55 @@ struct drm_i915_gem_context_param {
#define I915_CONTEXT_MAX_USER_PRIORITY 1023 /* inclusive */
#define I915_CONTEXT_DEFAULT_PRIORITY 0
#define I915_CONTEXT_MIN_USER_PRIORITY -1023 /* inclusive */
/*
* When using the following param, value should be a pointer to
* drm_i915_gem_context_param_sseu.
*/
#define I915_CONTEXT_PARAM_SSEU 0x7

__u64 value;
};


struct drm_i915_gem_context_param_sseu {
/*
* Engine class & instance to be configured or queried.
*/
__u16 engine_class;
__u16 engine_instance;

/*
* Unused for now. Must be cleared to zero.
*/
#define I915_SSEU_USE_ENGINE_MAP_INDEX (1 << 0)
__u32 flags;

/*
* Mask of slices to enable for the context. Valid values are a subset
* of the bitmask value returned for I915_PARAM_SLICE_MASK.
*/
__u64 slice_mask;

/*
* Mask of subslices to enable for the context. Valid values are a
* subset of the bitmask value return by I915_PARAM_SUBSLICE_MASK.
*/
__u64 subslice_mask;

/*
* Minimum/Maximum number of EUs to enable per subslice for the
* context. min_eus_per_subslice must be inferior or equal to
* max_eus_per_subslice.
*/
__u16 min_eus_per_subslice;
__u16 max_eus_per_subslice;

/*
* Unused for now. Must be cleared to zero.
*/
__u32 rsvd;
};

enum drm_i915_oa_format {
I915_OA_FORMAT_A13 = 1, /* HSW only */
I915_OA_FORMAT_A29, /* HSW only */
Expand Down

0 comments on commit dbffb5f

Please sign in to comment.