[Intel-gfx] [PATCH 1/5] drm/i915: downgrade non-lethal BUG_ONs
Chris Wilson
chris at chris-wilson.co.uk
Wed Apr 20 16:36:13 CEST 2011
On Wed, 20 Apr 2011 07:27:24 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
> 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?
This particular BUG_ON() I added at Daniel's request to clarify the
reservation fallback logic. Code inspection should be sufficient to
verify that the BUG_ON() is not required, and by now we should be happy
that we didn't miss anything.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list