From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: Relinquish any fence when changing cache levels Date: Wed, 13 Apr 2011 17:59:59 +0100 Message-ID: <0d30dc$lqtgut@orsmga001.jf.intel.com> References: <1302697540-27324-1-git-send-email-chris@chris-wilson.co.uk> <87bp0ahzwn.fsf@pollan.anholt.net> 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 049829E73D for ; Wed, 13 Apr 2011 10:00:17 -0700 (PDT) In-Reply-To: <87bp0ahzwn.fsf@pollan.anholt.net> 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: Eric Anholt , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, 13 Apr 2011 09:36:08 -0700, Eric Anholt wrote: > On Wed, 13 Apr 2011 13:25:40 +0100, Chris Wilson wrote: > > This is vital to maintain our contract with the hw for not using fences > > on snooped memory for older chipsets. It should have no impact > > other than clearing the fence register (and updating the fence > > bookkeeping) as any future IO access (page faults or pwrite/pread) will > > go through the cached CPU domain for older chipsets. On SandyBridge, we > > incur an extra get_fence() on the rare path that we need to perform > > detiling through a pagefault (i.e. texture transfers). > > Surely you could just update this to do that for the hardware that > requires it. With a comment so someone doesn't delete it later :) The comment is surely lacking, yes. But the test here for the right generations is just ugly since losing a CPU fence register is not that big an issue -- the largest overhead will be in reinstating the vma, and we need to do that anyway if we mix CPU / GTT reads through the pagefault handler. -Chris -- Chris Wilson, Intel Open Source Technology Centre