We want to be able to report back to userspace details about an engine's class, and in return for userspace to be able to request actions regarding certain classes of engines. To isolate the uABI from any variations between hw generations, we define an abstract class for the engines and internally map onto the hw. v2: Remove MAX from the uABI; keep it internal if we need it, but don't let userspace make the mistake of using it themselves. v3: s/OTHER/INVALID/ The use of OTHER is ill-defined, so remove it from the uABI as any future new type of engine can define a class to suit it. But keep a reserved value for an invalid class, so that we can always unambiguously express when something doesn't belong to the classification.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -86,6 +86,22 @@ enum i915_mocs_table_index { · 85 unmodified lines | |||
| 86 | I915_MOCS_CACHED, | 86 | I915_MOCS_CACHED, |
| 87 | }; | 87 | }; |
| 88 | 88 | ||
| 89 | /* | ||
| 90 | * Different engines serve different roles, and there may be more than one | ||
| 91 | * engine serving each role. enum drm_i915_gem_engine_class provides a | ||
| 92 | * classification of the role of the engine, which may be used when requesting | ||
| 93 | * operations to be performed on a certain subset of engines, or for providing | ||
| 94 | * information about that group. | ||
| 95 | */ | ||
| 96 | enum drm_i915_gem_engine_class { | ||
| 97 | I915_ENGINE_CLASS_RENDER = 0, | ||
| 98 | I915_ENGINE_CLASS_COPY = 1, | ||
| 99 | I915_ENGINE_CLASS_VIDEO = 2, | ||
| 100 | I915_ENGINE_CLASS_VIDEO_ENHANCE = 3, | ||
| 101 | |||
| 102 | I915_ENGINE_CLASS_INVALID = -1 | ||
| 103 | }; | ||
| 104 | |||
| 89 | /* Each region is a minimum of 16k, and there are at most 255 of them. | 105 | /* Each region is a minimum of 16k, and there are at most 255 of them. |
| 90 | */ | 106 | */ |
| 91 | #define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use | 107 | #define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use |