[Intel-gfx] [PATCH v5 2/9] drm/i915: Define an engine class enum for the uABI

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Thu Nov 9 10:04:17 UTC 2017


On 09/11/2017 09:37, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2017-11-09 09:27:33)
>>
>> On 09/11/2017 09:13, Lionel Landwerlin wrote:
>>> On 08/11/17 19:14, Chris Wilson wrote:
>>>> +/*
>>>> + * Different engines serve different roles, and there may be more
>>>> than one
>>>> + * engine serving each role. enum drm_i915_gem_engine_class provides a
>>>> + * classification of the role of the engine, which may be used when
>>>> requesting
>>>> + * operations to be performed on a certain subset of engines, or for
>>>> providing
>>>> + * information about that group.
>>>> + */
>>>> +enum drm_i915_gem_engine_class {
>>>> +    I915_ENGINE_CLASS_OTHER = 0,
>>>> +    I915_ENGINE_CLASS_RENDER = 1,
>>>> +    I915_ENGINE_CLASS_COPY = 2,
>>>> +    I915_ENGINE_CLASS_VIDEO = 3,
>>>> +    I915_ENGINE_CLASS_VIDEO_ENHANCE = 4,
>>>> +};
>>>> +
>>> I've tried to build a bit UI in GPUTop to show this.
>>> I'm a bit skeptical about the OTHER type because if this enum is meant
>>> to be extended, then why do we need an OTHER class? We should create new
>>> classes instead.
>>
>> Good point, I agree that I cannot find a reason why we would have it in
>> the uAPI. I suspect I was just doing a copy-paste-transform of the
>> hardware definitions from i915_reg.h.
> 
> Do we want to keep 0 as undefined? It can be both a nuisance and a
> blessing...

What can you imagine it would be useful for?

Regards,

Tvrtko


More information about the Intel-gfx mailing list