History

drm/i915/xehp: Add compute engine ABI

We're now ready to start exposing compute engines to userspace. v2: - Move kerneldoc for other engine classes to a separate patch. (Andi)

Matt Roper committed 4 years ago

Commit ecf8eca1 parent 97e17a04 files · +12 −2Browse files

Unified · Split

4 files
  1. drivers/gpu/drm/i915/gt/intel_engine_user.c +1 −1
  2. drivers/gpu/drm/i915/i915_drm_client.c +1 −0
  3. drivers/gpu/drm/i915/i915_drm_client.h +1 −1
  4. include/uapi/drm/i915_drm.h +9 −0
drivers/gpu/drm/i915/gt/intel_engine_user.c+1−1
@@ -47,7 +47,7 @@ static const u8 uabi_classes[] = { · 46 unmodified lines
4747 [COPY_ENGINE_CLASS] = I915_ENGINE_CLASS_COPY,
4848 [VIDEO_DECODE_CLASS] = I915_ENGINE_CLASS_VIDEO,
4949 [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,
5151 };
5252
5353 static int engine_cmp(void *priv, const struct list_head *A,
drivers/gpu/drm/i915/i915_drm_client.c+1−0
@@ -81,6 +81,7 @@ static const char * const uabi_class_names[] = { · 80 unmodified lines
8181 [I915_ENGINE_CLASS_COPY] = "copy",
8282 [I915_ENGINE_CLASS_VIDEO] = "video",
8383 [I915_ENGINE_CLASS_VIDEO_ENHANCE] = "video-enhance",
84+ [I915_ENGINE_CLASS_COMPUTE] = "compute",
8485 };
8586
8687 static u64 busy_add(struct i915_gem_context *ctx, unsigned int class)
drivers/gpu/drm/i915/i915_drm_client.h+1−1
@@ -13,7 +13,7 @@ · 12 unmodified lines
1313
1414 #include "gt/intel_engine_types.h"
1515
16−#define I915_LAST_UABI_ENGINE_CLASS I915_ENGINE_CLASS_VIDEO_ENHANCE
16+#define I915_LAST_UABI_ENGINE_CLASS I915_ENGINE_CLASS_COMPUTE
1717
1818 struct drm_i915_private;
1919
include/uapi/drm/i915_drm.h+9−0
@@ -203,6 +203,15 @@ enum drm_i915_gem_engine_class { · 202 unmodified lines
203203 */
204204 I915_ENGINE_CLASS_VIDEO_ENHANCE = 3,
205205
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+
206215 /* Values in this enum should be kept compact. */
207216
208217 /**