We're now ready to start exposing compute engines to userspace. v2: - Move kerneldoc for other engine classes to a separate patch. (Andi)
Unified · Split
| @@ -47,7 +47,7 @@ static const u8 uabi_classes[] = { · 46 unmodified lines | ||
| 47 | 47 | [COPY_ENGINE_CLASS] = I915_ENGINE_CLASS_COPY, |
| 48 | 48 | [VIDEO_DECODE_CLASS] = I915_ENGINE_CLASS_VIDEO, |
| 49 | 49 | [VIDEO_ENHANCEMENT_CLASS] = I915_ENGINE_CLASS_VIDEO_ENHANCE, |
| 50 | − /* TODO: Add COMPUTE_CLASS mapping once ABI is available */ | |
| 50 | + [COMPUTE_CLASS] = I915_ENGINE_CLASS_COMPUTE, | |
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | 53 | static int engine_cmp(void *priv, const struct list_head *A, |
| @@ -81,6 +81,7 @@ static const char * const uabi_class_names[] = { · 80 unmodified lines | ||
| 81 | 81 | [I915_ENGINE_CLASS_COPY] = "copy", |
| 82 | 82 | [I915_ENGINE_CLASS_VIDEO] = "video", |
| 83 | 83 | [I915_ENGINE_CLASS_VIDEO_ENHANCE] = "video-enhance", |
| 84 | + [I915_ENGINE_CLASS_COMPUTE] = "compute", | |
| 84 | 85 | }; |
| 85 | 86 | |
| 86 | 87 | static u64 busy_add(struct i915_gem_context *ctx, unsigned int class) |
| @@ -13,7 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | |
| 14 | 14 | #include "gt/intel_engine_types.h" |
| 15 | 15 | |
| 16 | −#define I915_LAST_UABI_ENGINE_CLASS I915_ENGINE_CLASS_VIDEO_ENHANCE | |
| 16 | +#define I915_LAST_UABI_ENGINE_CLASS I915_ENGINE_CLASS_COMPUTE | |
| 17 | 17 | |
| 18 | 18 | struct drm_i915_private; |
| 19 | 19 | |
| @@ -203,6 +203,15 @@ enum drm_i915_gem_engine_class { · 202 unmodified lines | ||
| 203 | 203 | */ |
| 204 | 204 | I915_ENGINE_CLASS_VIDEO_ENHANCE = 3, |
| 205 | 205 | |
| 206 | + /** | |
| 207 | + * @I915_ENGINE_CLASS_COMPUTE: | |
| 208 | + * | |
| 209 | + * Compute engines support a subset of the instructions available | |
| 210 | + * on render engines: compute engines support Compute (GPGPU) and | |
| 211 | + * programmable media workloads, but do not support the 3D pipeline. | |
| 212 | + */ | |
| 213 | + I915_ENGINE_CLASS_COMPUTE = 4, | |
| 214 | + | |
| 206 | 215 | /* Values in this enum should be kept compact. */ |
| 207 | 216 | |
| 208 | 217 | /** |