intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/5] drm/i915: downgrade non-lethal BUG_ONs
Date: Wed, 20 Apr 2011 15:36:13 +0100	[thread overview]
Message-ID: <1bdc18$k9v09n@fmsmga002.fm.intel.com> (raw)
In-Reply-To: <20110420142724.GA12270@lundgren.kumite>

On Wed, 20 Apr 2011 07:27:24 -0700, Ben Widawsky <ben@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

  reply	other threads:[~2011-04-20 14:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19 20:45 [PATCH 0/5] various small patches for -next Daniel Vetter
2011-04-19 20:46 ` [PATCH 1/5] drm/i915: downgrade non-lethal BUG_ONs Daniel Vetter
2011-04-20  8:18   ` Chris Wilson
2011-04-20 14:27     ` Ben Widawsky
2011-04-20 14:36       ` Chris Wilson [this message]
2011-04-19 20:46 ` [PATCH 2/5] drm/i915: not finding a fence is a non-recoverable condition Daniel Vetter
2011-04-19 20:46 ` [PATCH 3/5] drm/i915: check gpu_write_list in move_to_flushing Daniel Vetter
2011-04-19 20:46 ` [PATCH 4/5] drm/i915: fix relaxed tiling on gen2: y-tiling on i855gm Daniel Vetter
2011-04-19 20:46 ` [PATCH 5/5] drm/i915: fix relaxed tiling on gen2: tile height Daniel Vetter
2011-04-21  9:23 ` [PATCH 0/5] various small patches for -next Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='1bdc18$k9v09n@fmsmga002.fm.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=ben@bwidawsk.net \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).