[igt-dev] [RFC PATCH v4 2/3] lib: implement new engine discovery interface

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Jan 15 13:50:46 UTC 2019


On 15/01/2019 13:41, Andi Shyti wrote:
> Hi Tvrtko,
> 
>>>> -const struct intel_execution_engine2 intel_execution_engines2[] = {
>>>> -       { "rcs0", I915_ENGINE_CLASS_RENDER, 0 },
>>>> -       { "bcs0", I915_ENGINE_CLASS_COPY, 0 },
>>>> -       { "vcs0", I915_ENGINE_CLASS_VIDEO, 0 },
>>>> -       { "vcs1", I915_ENGINE_CLASS_VIDEO, 1 },
>>>> -       { "vecs0", I915_ENGINE_CLASS_VIDEO_ENHANCE, 0 },
>>>> -       { }
>>>> -};
>>>> +struct intel_execution_engine2 intel_execution_engines2[32] = { };
>>
>> I'd just make it a pointer, both size and explicit static initialization to
>> zero are not needed.
> 
> So that you want to allocate *intel_execution_engines2 somewhere
> in gem_init_engine_list(), is this what you are recommending?

Yep. Do you see an advantage of putting it in the data segment? I don't 
think failure to allocate this on heap at startup is a concern.

Regards,

Tvrtko


More information about the igt-dev mailing list