From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: Update rules for writing through the LLC with the cpu Date: Fri, 9 Aug 2013 14:56:21 +0300 Message-ID: <20130809115620.GF5004@intel.com> References: <1375969271-4331-3-git-send-email-chris@chris-wilson.co.uk> <1376047605-6000-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 633C3E6794 for ; Fri, 9 Aug 2013 04:56:24 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1376047605-6000-1-git-send-email-chris@chris-wilson.co.uk> 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 Fri, Aug 09, 2013 at 12:26:45PM +0100, Chris Wilson wrote: > As mentioned in the previous commit, reads and writes from both the CPU > and GPU go through the LLC. This gives us coherency between the CPU and > GPU irrespective of the attribute settings either device sets. We can > use to avoid having to clflush even uncached memory. > = > Except for the scanout. > = > The scanout resides within another functional block that does not use > the LLC but reads directly from main memory. So in order to maintain > coherency with the scanout, writes to uncached memory must be flushed. > In order to optimize writes elsewhere, we start tracking whether an > framebuffer is attached to an object. > = > v2: Use pin_display tracking rather than fb_count (to ensure we flush > cursors as well etc) and only force the clflush along explicit writes to > the scanout paths (i.e. pin_to_display_plane and pwrite into scanout). > = > v3: Force the flush after hitting the slowpath in pwrite, as after > dropping the lock the object's cache domain may be invalidated. (Ville) > = > Based on a patch by Ville Syrj=E4l=E4. > = > Signed-off-by: Chris Wilson > Cc: Ville Syrj=E4l=E4 Reviewed-by: Ville Syrj=E4l=E4 -- = Ville Syrj=E4l=E4 Intel OTC