From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: force wake reference counting (another try) Date: Tue, 12 Apr 2011 23:35:54 -0700 Message-ID: <20110413063553.GA4629@lundgren.kumite> References: <1302570079-17032-1-git-send-email-ben@bwidawsk.net> <1bdc18$k6h5tu@fmsmga002.fm.intel.com> <20110412163022.GA12791@snipes.kumite> <1bdc18$k6n2j0@fmsmga002.fm.intel.com> <20110413013151.GB30729@bwgnt.jf.intel.com> <1bdc18$k6u1m8@fmsmga002.fm.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E3B39E764 for ; Tue, 12 Apr 2011 23:35:57 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1bdc18$k6u1m8@fmsmga002.fm.intel.com> 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: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Apr 13, 2011 at 06:52:15AM +0100, Chris Wilson wrote: > On Tue, 12 Apr 2011 18:31:51 -0700, Ben Widawsky wrote: > > I think we have no other option since the first thing that > > i915_driver_irq_handler() does is read IIR, which according to the limited > > knowledge I have requires forcewake. > > That makes no sense at all. :( > > But then I'm only a lowly sw engineer, > -Chris This was my initial thought as well, but as I was saying on IRC... my only guess is they assumed that the time to service the interrupt is less than the time it takes to powerdown, and that the GT must be awake to send an interrupt. My other guess is I've got this all wrong. However if we go with the former: x = interrupt latency y = interrupt servicing z = time before the GT powers down they assume (x + y) < z And we need to remember that y is only enough time to get in and set the forceawake bit before the GT has powered down. So this actually seems like a reasonable thing to assume since I think powerdown time is in microsecond granularity. To what Keith said just above this, it does seem there are some registers in the <0x40000 range which are special, but I don't see IIR there. I am surprised by this as well, and I'd suggest we try to find people to verify it. Ben