History

drm/i915: Define an engine class enum for the uABI

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.

Tvrtko Ursulin committed 9 years ago

Commit 1803fcb1 parent 9511ce13 files · +29 −2Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/drm/i915_drm.h+16−0
@@ -86,6 +86,22 @@ enum i915_mocs_table_index { · 85 unmodified lines
8686 I915_MOCS_CACHED,
8787 };
8888
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+
89105 /* Each region is a minimum of 16k, and there are at most 255 of them.
90106 */
91107 #define I915_NR_TEX_REGIONS 255 /* table size 2k - maximum due to use

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t