From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 4/4] drm/i915: optional fewer warning patch Date: Sat, 9 Apr 2011 16:32:04 -0700 Message-ID: <20110409233203.GA5736@lundgren.kumite> References: <1302284850-8274-1-git-send-email-ben@bwidawsk.net> <1302381082-3167-1-git-send-email-ben@bwidawsk.net> <1302381082-3167-2-git-send-email-ben@bwidawsk.net> <1302381082-3167-3-git-send-email-ben@bwidawsk.net> <1302381082-3167-4-git-send-email-ben@bwidawsk.net> <1302381082-3167-5-git-send-email-ben@bwidawsk.net> <849307$cd80vp@azsmga001.ch.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 C9F0B9E752 for ; Sat, 9 Apr 2011 16:32:06 -0700 (PDT) Content-Disposition: inline In-Reply-To: <849307$cd80vp@azsmga001.ch.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 Sat, Apr 09, 2011 at 11:31:14PM +0100, Chris Wilson wrote: > On Sat, 9 Apr 2011 13:31:22 -0700, Ben Widawsky wrote: > > + * > > + * Intelligent users of the interface may do a force_wake_get() followed > > + * by many register reads and writes, knowing that the reference count > > + * is already incremented. So we do not want to warn on those. > > */ > > Hmm, any place where we touch registers without holding a lock, unless > under exceptional conditions such as !SYSTEM_RUNNING, is a bug waiting to > happen. And probably already happened. Nasty, hard to reproduce race > conditions. The only use I had in mind was doing a bunch of reads, or perhaps polling on a register. I didn't have a specific case but it seemed feasible in certain cases. > -Chris Ben