Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/i915: forcewake struct mutex locking fixes
Date: Fri, 22 Apr 2011 09:41:21 -0700	[thread overview]
Message-ID: <20110422164120.GC27642@bwgnt.jf.intel.com> (raw)
In-Reply-To: <20110422162016.GB27642@bwgnt.jf.intel.com>

On Fri, Apr 22, 2011 at 09:20:17AM -0700, Ben Widawsky wrote:
> On Thu, Apr 21, 2011 at 07:18:24AM +0100, Chris Wilson wrote:
> > On Wed, 20 Apr 2011 16:53:17 -0700, Ben Widawsky <ben@bwidawsk.net> wrote:
> > > 
> > > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> > 
> > Just to annoy you, this needs to be split up into the various categories
> > of fixes. Because...
> > 
> > >  static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
> > > @@ -3067,9 +3074,12 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc)
> > >  	intel_disable_pll(dev_priv, pipe);
> > >  
> > >  	intel_crtc->active = false;
> > > +
> > > +	mutex_lock(&dev->struct_mutex);
> > >  	intel_update_fbc(dev);
> > >  	intel_update_watermarks(dev);
> > >  	intel_clear_scanline_wait(dev);
> > > +	mutex_unlock(&dev->struct_mutex);
> > >  }
> > 
> > This is overly correct. You can put a comment here to say that we will
> > never attempt to use FORCEWAKE here and that these registers are protected
> > by the mode_config lock. Except for intel_clear_scanline_wait, but that
> > itself is is longing to be killed now. If we haven't fixed the underlying
> > bug that we were working around by now, we have been too lax.
> > -Chris
> 
> I don't understand what you're asking for. I'm pretty convinced I need
> the mutex protected intel_update_fbc, because the call trace could be:
> 
> intel_update_fbc()
> intel_enable_fbc()
> ironlake_enable_fbc()
> sandybridge_blit_fbc_update()
> gen6_gt_force_wake_get()
> 
> 
> Could you elaborate?
> 
> Ben

Crap. I wasn't paying attention. You're right, I did this to be
symmetric with the other code. I can remove it if you prefer.

  reply	other threads:[~2011-04-22 16:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-20 23:53 forcewake v5 Ben Widawsky
2011-04-20 23:53 ` [PATCH 1/5] drm/i915: proper use of forcewake Ben Widawsky
2011-04-25 18:22   ` Ben Widawsky
2011-04-20 23:53 ` [PATCH 2/5] drm/i915: reference counted forcewake Ben Widawsky
2011-04-25 18:23   ` Ben Widawsky
2011-04-20 23:53 ` [PATCH 3/5] drm/i915: forcewake struct mutex locking fixes Ben Widawsky
2011-04-21  6:18   ` Chris Wilson
2011-04-22 16:20     ` Ben Widawsky
2011-04-22 16:41       ` Ben Widawsky [this message]
2011-04-22 17:00       ` Chris Wilson
2011-04-25 18:24   ` Ben Widawsky
2011-04-20 23:53 ` [PATCH 4/5] drm/i915: move gen6 rps handling to workqueue Ben Widawsky
2011-04-21  6:34   ` Chris Wilson
2011-04-22 16:12     ` Ben Widawsky
2011-04-25 18:25   ` Ben Widawsky
2011-04-20 23:53 ` [PATCH 5/5] drm/i915: debugfs interface for forcewake reference count Ben Widawsky
2011-04-25 18:25   ` Ben Widawsky
2011-04-25 19:28     ` Chris Wilson
2011-04-25 21:46       ` Ben Widawsky
2011-04-26  7:57         ` Chris Wilson
2011-04-21  6:39 ` forcewake v5 Chris Wilson
2011-04-25 18:21   ` Ben Widawsky

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=20110422164120.GC27642@bwgnt.jf.intel.com \
    --to=ben@bwidawsk.net \
    --cc=chris@chris-wilson.co.uk \
    --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