drm/i915/gt: Move the [class][inst] lookup for engines onto the GT
To maintain a fast lookup from a GT centric irq handler, we want the engine lookup tables on the intel_gt. To avoid having multiple copies of the same multi-dimension lookup table, move the generic user engine lookup into an rbtree (for fast and flexible indexing). v2: Split uabi_instance cf uabi_class v3: Set uabi_class/uabi_instance after collating all engines to provide a stable uabi across parallel unordered construction. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> #v2 Link: https://patchwork.freedesktop.org/patch/msgid/20190806124300.24945-2-chris@chris-wilson.co.uk
此提交包含在:
@@ -70,6 +70,7 @@
|
||||
#include <drm/i915_drm.h>
|
||||
|
||||
#include "gt/intel_lrc_reg.h"
|
||||
#include "gt/intel_engine_user.h"
|
||||
|
||||
#include "i915_gem_context.h"
|
||||
#include "i915_globals.h"
|
||||
@@ -1729,7 +1730,7 @@ get_engines(struct i915_gem_context *ctx,
|
||||
|
||||
if (e->engines[n]) {
|
||||
ci.engine_class = e->engines[n]->engine->uabi_class;
|
||||
ci.engine_instance = e->engines[n]->engine->instance;
|
||||
ci.engine_instance = e->engines[n]->engine->uabi_instance;
|
||||
}
|
||||
|
||||
if (copy_to_user(&user->engines[n], &ci, sizeof(ci))) {
|
||||
|
新增問題並參考
封鎖使用者