From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 27/30] drm/i915: Invalidate fenced read domains upon flush Date: Wed, 13 Apr 2011 21:38:50 +0100 Message-ID: References: <1302640318-23165-1-git-send-email-chris@chris-wilson.co.uk> <1302640318-23165-28-git-send-email-chris@chris-wilson.co.uk> <20110413194357.GI3660@viiv.ffwll.ch> 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 860629E88F for ; Wed, 13 Apr 2011 13:38:54 -0700 (PDT) In-Reply-To: <20110413194357.GI3660@viiv.ffwll.ch> 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: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, 13 Apr 2011 21:43:59 +0200, Daniel Vetter wrote: > On Tue, Apr 12, 2011 at 09:31:55PM +0100, Chris Wilson wrote: > > Whenever we finish reading an object through a fence, for safety we > > clear any GPU read domain and so invalidate any TLBs associated with > > the fenced region upon its next use. > > Now that flush_fence ensures that we are paranoid and flush/invalidate > caches the > if (fenced_gpu_access && !pending_fenced_gpu_access) > flush_some_more(); > code is indeed superfluous. But please explain that in the changelog, it has > taken me a while to (re-)figure out while the second hunk is correct. Ok: Whenever we finish reading an object through a fence, for safety we clear any GPU read domain and so invalidate any TLBs associated with the fenced region upon its next use. As we now always flush writes through an existing fence before it is released and then trigger the invalidation of the GPU domains should we ever re-use it again on the GPU, we no longer need to compare and force the invalidation if the fenced access changes in move_to_gpu(). -Chris -- Chris Wilson, Intel Open Source Technology Centre