On Fri, Apr 07, 2017 at 02:15:48AM -0700, Oscar Mateo wrote: > There are some properties that logically belong to the engine class, and some > that belong to the engine instance. Make it explicit. > > v2: Commit message (Tvrtko) > > v3: > - Rebased > - Exec/uabi id should be per instance (Chris) > > v4: > - Rebased > - Avoid re-ordering fields for smaller diff (Tvrtko) > - Bug on oob access to the class array (Michal) > > Cc: Tvrtko Ursulin <tvrtko.ursu...@intel.com> > Cc: Paulo Zanoni <paulo.r.zan...@intel.com> > Cc: Rodrigo Vivi <rodrigo.v...@intel.com> > Cc: Chris Wilson <ch...@chris-wilson.co.uk> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospu...@intel.com> > Cc: Michal Wajdeczko <michal.wajdec...@intel.com> > Signed-off-by: Oscar Mateo <oscar.ma...@intel.com> > ---
<snip> > @@ -99,8 +112,12 @@ > enum intel_engine_id id) > { > const struct engine_info *info = &intel_engines[id]; > + const struct engine_class_info *class_info; > struct intel_engine_cs *engine; > > + GEM_BUG_ON(info->class > ARRAY_SIZE(intel_engine_classes)); > + class_info = &intel_engine_classes[info->class]; > + Hmm, I think we should check against info->class >= ARRAY_SIZE, as index 4 can't be used on array[4] -Michal _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx