[Intel-gfx] [PATCH] drm/i915: Use BUILD_BUG_ON to detected missing engine definitions

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Feb 28 14:31:29 UTC 2017


On ti, 2017-02-28 at 14:21 +0000, Tvrtko Ursulin wrote:
> The caller of this function iterates 0..ARRAY_SIZE(intel_engines) and 
> also filters with HAS_ENGINE before calling it so not sure this is 
> absolutely needed. Maybe instead:
> 
> GEM_BUG_ON(id >= ARRAY_SIZE(dev_priv->engine));

I think that's even better.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list