From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: force wake reference counting (another try) Date: Tue, 12 Apr 2011 18:21:23 +0100 Message-ID: <1bdc18$k6n2j0@fmsmga002.fm.intel.com> References: <1302570079-17032-1-git-send-email-ben@bwidawsk.net> <1bdc18$k6h5tu@fmsmga002.fm.intel.com> <20110412163022.GA12791@snipes.kumite> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B2729E7CB for ; Tue, 12 Apr 2011 10:21:27 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Keith Packard , Ben Widawsky Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, 12 Apr 2011 09:56:03 -0700, Keith Packard wrote: > On Tue, 12 Apr 2011 09:30:22 -0700, Ben Widawsky wrote: > > > I am going to spend at least a day tracking down, and hopefully fixing > > warnings if you agree with my next statement that it is in fact a > > problem. My hope is there aren't too many cases. > > I can't see how we can survive without using exactly one lock covering > the wake locks on SNB. Has someone tried sticking a simple spinlock > around the whole sequence (force_wake_get, op, force_wake_put)? Agreed. I had been working under the assumption that dev->struct_mutex was the sufficient lock. This may be entirely due to the false premise that we only needed i915_gt_read() for the ring registers. I still haven't looked through just what registers are impacted. Ben, as you work through this can you amend the register names to include whether it is inside the GT power well? And a precise next to gen6_gt_forcewake_get() on which groups of registers are affected. GEN6_GT_x vs GEN6_y? -Chris -- Chris Wilson, Intel Open Source Technology Centre