[Intel-gfx] [PATCH] drm/i915: Use GEM_WARN_ON to catch invalid engine indices.

Chris Wilson chris at chris-wilson.co.uk
Thu Mar 2 09:56:33 UTC 2017


On Thu, Mar 02, 2017 at 10:42:05AM +0100, Michal Wajdeczko wrote:
> On Thu, Mar 02, 2017 at 07:33:26AM +0000, Tvrtko Ursulin wrote:
> > 
> > On 01/03/2017 20:27, Michal Wajdeczko wrote:
> > > +	GEM_BUG_ON(dev_priv->engine[id]);
> > 
> > It doesn't really matter but I think moving this one was not needed.
> 
> Moved here just to correlate this assert with the actual critical assignment
> from the line below. I can revert it if you prefer old way.

It just comes down to whether we want to document the function
preconditions, or indicate the critical relationships.  Either is good.
In this case we choose to document that it would be silly to call setup
multiple times for the same engine.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list