[Intel-gfx] [PATCH] drm/i915/gt: Move the [class][inst] lookup for engines onto the GT

Chris Wilson chris at chris-wilson.co.uk
Sun Jul 14 14:14:51 UTC 2019


Quoting Chris Wilson (2019-07-14 15:12:20)
> +void intel_engine_add_user(struct intel_engine_cs *engine)
> +{
> +       struct rb_root *root = &engine->i915->uabi_engines;
> +       struct rb_node **p, *parent;
> +
> +       parent = NULL;
> +       p = &root->rb_node;
> +       while (*p) {
> +               struct intel_engine_cs *it;
> +
> +               parent = *p;
> +               it = rb_entry(parent, typeof(*it), uabi_node);
> +
> +               /* All user class:instance identifiers must be unique */
> +               GEM_BUG_ON(it->uabi_class == engine->uabi_class &&
> +                          it->instance == engine->instance);

I'm thinking maybe we should call this uabi_instance.
-Chris


More information about the Intel-gfx mailing list