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. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> #v2 Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171110142634.10551-1-chris@chris-wilson.co.uk
This commit is contained in:

committed by
Chris Wilson

parent
9511ce1ce7
commit
1803fcbca2
@@ -289,11 +289,14 @@ struct intel_engine_execlists {
|
||||
struct intel_engine_cs {
|
||||
struct drm_i915_private *i915;
|
||||
char name[INTEL_ENGINE_CS_MAX_NAME];
|
||||
|
||||
enum intel_engine_id id;
|
||||
unsigned int uabi_id;
|
||||
unsigned int hw_id;
|
||||
unsigned int guc_id;
|
||||
|
||||
u8 uabi_id;
|
||||
u8 uabi_class;
|
||||
|
||||
u8 class;
|
||||
u8 instance;
|
||||
u32 context_size;
|
||||
|
Reference in New Issue
Block a user