From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH v2 1/4] drm/i915: Don't allow ring tail to reach the same cacheline as head Date: Thu, 29 Nov 2012 13:25:12 +0200 Message-ID: <20121129112512.GD21547@intel.com> References: <1354041298-18898-1-git-send-email-ville.syrjala@linux.intel.com> <1354041298-18898-2-git-send-email-ville.syrjala@linux.intel.com> <20121128204546.GA3202@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 92EBAE6533 for ; Thu, 29 Nov 2012 03:25:19 -0800 (PST) Content-Disposition: inline In-Reply-To: <20121128204546.GA3202@phenom.ffwll.local> 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, Nov 28, 2012 at 09:45:46PM +0100, Daniel Vetter wrote: > On Tue, Nov 27, 2012 at 08:34:55PM +0200, ville.syrjala@linux.intel.com w= rote: > > From: Ville Syrj=E4l=E4 > > = > > From BSpec: > > "If the Ring Buffer Head Pointer and the Tail Pointer are on the same > > cacheline, the Head Pointer must not be greater than the Tail > > Pointer." > > = > > The easiest way to enforce this is to reduce the reported ring space. > > = > > References: > > Gen2 BSpec "1. Programming Environment" / "1.4.4.6 Ring Buffer Use" > > Gen3 BSpec "vol1c Memory Interface Functions" / "2.3.4.5 Ring Buffer Us= e" > > Gen4+ BSpec "vol1c Memory Interface and Command Stream" / "5.3.4.5 Ring= Buffer Use" > > = > > v2: Include the exact BSpec references in the description > > = > > Signed-off-by: Ville Syrj=E4l=E4 > > Reviewed-by: Chris Wilson > = > Another small bikeshed for this one: Less magic numbers with > = > #define RING_FREE_SPACE 64 Can do. And since the number will only appear in one place, I think I'll stick the BSpec references into a comment above it. -- = Ville Syrj=E4l=E4 Intel OTC