From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: enabling forcewake from userspace Date: Sat, 26 Mar 2011 17:18:57 +0000 Message-ID: <0d30dc$ljrf4q@orsmga001.jf.intel.com> References: <1301105269-23970-1-git-send-email-ben@bwidawsk.net> <20110326022358.GA24223@lundgren.kumite> <20110326154625.GA5068@lundgren.kumite> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id EA2E99E77C for ; Sat, 26 Mar 2011 10:19:00 -0700 (PDT) In-Reply-To: <20110326154625.GA5068@lundgren.kumite> 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: Ben Widawsky Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sat, 26 Mar 2011 08:46:25 -0700, Ben Widawsky wrote: > I think I won't bother trying to upstream my solution. But I'm also > thinking we should make intel_reg_read/write print a warning/error if > it's running on GEN6? What do you think? Adding a code comment or an if (IS_GEN6 && reg < 0x40000 && FORCE_WAKE == 0) printf("Muppet!\n"); is about as far as I would go. Certainly don't remind us on every invocation. > By the way, I do think the patch is beneficial just for kernel usage. > Right now it doesn't matter, but as more users of the interface pop up, > particularly in any time sensitive code... wouldn't it be awful if the > GPU could powerdown while we're servicing an interrupt? The GPU is definitely allowed to be powered down whilst the CPU is servicing an interrupt. ;-) I take your point though that the current method is not interrupt safe. However, we should not be doing such work from an interrupt handler - if need be all the actual work is kicked off from a workqueue. Something we need to keep an eye on, but not a problem today. *touch wood* -Chris -- Chris Wilson, Intel Open Source Technology Centre