[Intel-gfx] [PATCH 1/5] drm/i915: downgrade non-lethal BUG_ONs

Ben Widawsky ben at bwidawsk.net
Wed Apr 20 16:27:24 CEST 2011


On Wed, Apr 20, 2011 at 09:18:03AM +0100, Chris Wilson wrote:

> > diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> > index 316603e..8cac87c 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> > @@ -1093,7 +1093,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
> >  								&objects, eb,
> >  								exec,
> >  								args->buffer_count);
> > -			BUG_ON(!mutex_is_locked(&dev->struct_mutex));
> > +			WARN_ON(!mutex_is_locked(&dev->struct_mutex));
> 
> I think this can be dropped after close inspection of the call path.
> 

Is that right? There are definitely cases where the mutex is released
and not reacquired. You would know better than I if those cases can
occur in a normal system. Assuming they can, Won't we just BUG_ON when
we try to release struct_mutex?

> -Chris
> 

Ben



More information about the Intel-gfx mailing list