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
47 [COPY_ENGINE_CLASS] = I915_ENGINE_CLASS_COPY,47 [COPY_ENGINE_CLASS] = I915_ENGINE_CLASS_COPY,
48 [VIDEO_DECODE_CLASS] = I915_ENGINE_CLASS_VIDEO,48 [VIDEO_DECODE_CLASS] = I915_ENGINE_CLASS_VIDEO,
49 [VIDEO_ENHANCEMENT_CLASS] = I915_ENGINE_CLASS_VIDEO_ENHANCE,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
53static int engine_cmp(void *priv, const struct list_head *A,53static 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
81 [I915_ENGINE_CLASS_COPY] = "copy",81 [I915_ENGINE_CLASS_COPY] = "copy",
82 [I915_ENGINE_CLASS_VIDEO] = "video",82 [I915_ENGINE_CLASS_VIDEO] = "video",
83 [I915_ENGINE_CLASS_VIDEO_ENHANCE] = "video-enhance",83 [I915_ENGINE_CLASS_VIDEO_ENHANCE] = "video-enhance",
84 [I915_ENGINE_CLASS_COMPUTE] = "compute",
84};85};
85 86
86static u64 busy_add(struct i915_gem_context *ctx, unsigned int class)87static 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
13 13
14#include "gt/intel_engine_types.h"14#include "gt/intel_engine_types.h"
15 15
16#define I915_LAST_UABI_ENGINE_CLASS I915_ENGINE_CLASS_VIDEO_ENHANCE16#define I915_LAST_UABI_ENGINE_CLASS I915_ENGINE_CLASS_COMPUTE
17 17
18struct drm_i915_private;18struct drm_i915_private;
19 19
include/uapi/drm/i915_drm.h+9−0
@@ -203,6 +203,15 @@ enum drm_i915_gem_engine_class { · 202 unmodified lines
203 */203 */
204 I915_ENGINE_CLASS_VIDEO_ENHANCE = 3,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 /* Values in this enum should be kept compact. */215 /* Values in this enum should be kept compact. */
207 216
208 /**217 /**