[Intel-gfx] [PATCH] drm/i915: Engine discovery query

Chris Wilson chris at chris-wilson.co.uk
Thu Mar 14 15:57:20 UTC 2019


Quoting Tvrtko Ursulin (2019-03-14 14:44:19)
> +       len = sizeof(struct drm_i915_query_engine_info) +
> +             RUNTIME_INFO(i915)->num_engines *
> +             sizeof(struct drm_i915_engine_info);

Fairly recent macro helps here,
len = struct_size(query_ptr, engines, RUNTIME_INFO(i915)->num_engines);
-Chris


More information about the Intel-gfx mailing list