From: Chris Wilson Subject: Re: [PATCH] drm/i915: Decode RING_BUFFER_HEAD in error state Date: Mon, 22 Apr 2013 14:16:34 +0100 Message-ID: <20130422131634.GC22666@cantiga.alporthouse.com> References: <1366585279-18263-1-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id EB9C1E5C65 for ; Mon, 22 Apr 2013 06:16:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1366585279-18263-1-git-send-email-ben@bwidawsk.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: Ben Widawsky Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sun, Apr 21, 2013 at 04:01:19PM -0700, Ben Widawsky wrote: > I consistently forget how to decode the HEAD pointer. If we put it in > the error state, one doesn't need to look in docs to find the relevant > info. > > Signed-off-by: Ben Widawsky Turn the offset into an address and that would be really useful - then once can do a quick search on the value and jump straight into the right point in the ring. error->head[ring] & (0x7ffff << 2) + error->ring[ring].batchbuffer->gtt_offset -Chris -- Chris Wilson, Intel Open Source Technology Centre