mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
drm/i915: Introduce struct class_instance for engines across the uAPI
SSEU reprogramming of the context introduced the notion of engine class
and instance for a forwards compatible method of describing any engine
beyond the old execbuf interface. We wish to adopt this class:instance
description for more interfaces, so pull it out into a separate type for
userspace convenience.
Fixes: e46c2e99f6 ("drm/i915: Expose RPCS (SSEU) configuration to userspace (Gen11 only)")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Lionel Landwerlin <[email protected]>
Cc: Dmitry Rogozhkin <[email protected]>
Cc: Tony Ye <[email protected]>
Cc: Andi Shyti <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Acked-by: Tony Ye <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
1 parent
b16b2a2f70
commit
d1172ab3d4
2 files changed
+17
-6
No files matched your search
@@ -1386,8 +1386,8 @@ static int set_sseu(struct i915_gem_context *ctx,
|
||||
return -EINVAL;
|
||||
|
||||
engine = intel_engine_lookup_user(i915,
|
||||
user_sseu.engine_class,
|
||||
user_sseu.engine_instance);
|
||||
user_sseu.engine.engine_class,
|
||||
user_sseu.engine.engine_instance);
|
||||
if (!engine)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -1626,8 +1626,8 @@ static int get_sseu(struct i915_gem_context *ctx,
|
||||
return -EINVAL;
|
||||
|
||||
engine = intel_engine_lookup_user(ctx->i915,
|
||||
user_sseu.engine_class,
|
||||
user_sseu.engine_instance);
|
||||
user_sseu.engine.engine_class,
|
||||
user_sseu.engine.engine_instance);
|
||||
if (!engine)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
@@ -126,6 +126,18 @@ enum drm_i915_gem_engine_class {
|
||||
I915_ENGINE_CLASS_INVALID = -1
|
||||
};
|
||||
|
||||
/*
|
||||
* There may be more than one engine fulfilling any role within the system.
|
||||
* Each engine of a class is given a unique instance number and therefore
|
||||
* any engine can be specified by its class:instance tuplet. APIs that allow
|
||||
* access to any engine in the system will use struct i915_engine_class_instance
|
||||
* for this identification.
|
||||
*/
|
||||
struct i915_engine_class_instance {
|
||||
__u16 engine_class; /* see enum drm_i915_gem_engine_class */
|
||||
__u16 engine_instance;
|
||||
};
|
||||
|
||||
/**
|
||||
* DOC: perf_events exposed by i915 through /sys/bus/event_sources/drivers/i915
|
||||
*
|
||||
@@ -1525,8 +1537,7 @@ struct drm_i915_gem_context_param_sseu {
|
||||
/*
|
||||
* Engine class & instance to be configured or queried.
|
||||
*/
|
||||
__u16 engine_class;
|
||||
__u16 engine_instance;
|
||||
struct i915_engine_class_instance engine;
|
||||
|
||||
/*
|
||||
* Unused for now. Must be cleared to zero.
|
||||
|
||||
Reference in new issue
Block a user