From: Chris Wilson Subject: Re: [PATCH 3/9] drm/i915: Update rules for writing through the LLC with the cpu Date: Thu, 8 Aug 2013 17:12:45 +0100 Message-ID: <20130808161245.GA31119@cantiga.alporthouse.com> References: <1375969271-4331-1-git-send-email-chris@chris-wilson.co.uk> <1375969271-4331-3-git-send-email-chris@chris-wilson.co.uk> <20130808152712.GZ5004@intel.com> <20130808153635.GB30355@cantiga.alporthouse.com> <20130808155126.GA5004@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from fireflyinternet.com (s16502780.onlinehome-server.info [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 756F1E6962 for ; Thu, 8 Aug 2013 09:13:00 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130808155126.GA5004@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: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Aug 08, 2013 at 06:51:26PM +0300, Ville Syrj=E4l=E4 wrote: > On Thu, Aug 08, 2013 at 04:36:35PM +0100, Chris Wilson wrote: > > On Thu, Aug 08, 2013 at 06:27:12PM +0300, Ville Syrj=E4l=E4 wrote: > > > On Thu, Aug 08, 2013 at 02:41:05PM +0100, Chris Wilson wrote: > > > > if (!needs_clflush_after && > > > > obj->base.write_domain !=3D I915_GEM_DOMAIN_CPU) { > > > > - i915_gem_clflush_object(obj); > > > > + i915_gem_clflush_object(obj, false); > > > = > > > Shouldn't that be i915_gem_clflush_object(obj, obj->pin_display) ? > > = > > !needs_clflush_after implies that we cache-coherent and not writing to a > > scanout, so obj->pin_display must be false here. > = > But we dropped the lock in the slow path, so couldn't it have changed? Que sera, sera. The contents after userspace races with itself are going to be fairly arbitrary. Doing the flush is likely to be better than not... -Chris -- = Chris Wilson, Intel Open Source Technology Centre