[Intel-gfx] [PATCH] drm/i915: Engine discovery query
Chris Wilson
chris at chris-wilson.co.uk
Tue Oct 2 09:49:34 UTC 2018
Quoting Tvrtko Ursulin (2018-10-02 10:05:11)
>
> On 01/10/2018 20:39, Chris Wilson wrote:
> > Quoting Tvrtko Ursulin (2018-10-01 17:41:00)
> >>
> >> On 01/10/2018 17:24, Chris Wilson wrote:
> >>> Quoting Tvrtko Ursulin (2018-10-01 17:15:24)
> >>>> + len = sizeof(struct drm_i915_query_engine_info) +
> >>>> + I915_NUM_ENGINES * sizeof(struct drm_i915_engine_info);
> >>>
> >>> Since I915_NUM_ENGINES is not ABI, and this will be using a 2-step
> >>> query (1st to find length, 2nd to grab details), it should work with
> >>> info->num_rings. If not, we have problems later ;)
> >>
> >> I don't follow, what do you plan to enumerate that would cause a problem?
> >
> > All I'm suggesting is to avoid any notion that this length is fixed
> > indefinitely :)
>
> You mean extra paranoid step of making sure reported len exactly matches
> the number of reported engines * sizeof(engine_info)? uAPI is defined to
> query required memory block size and then read the reported num_engines
> so I think that's fine, but sure, I can make it match exactly.
No, my paranoia is towards people seeing I915_NUM_ENGINES and so
assuming this is constant.
-Chris
More information about the Intel-gfx
mailing list