From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Decode RING_BUFFER_HEAD in error state Date: Mon, 22 Apr 2013 17:17:41 +0200 Message-ID: <20130422151741.GC6169@phenom.ffwll.local> References: <1366585279-18263-1-git-send-email-ben@bwidawsk.net> <20130422131634.GC22666@cantiga.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by gabe.freedesktop.org (Postfix) with ESMTP id CEF38E5F32 for ; Mon, 22 Apr 2013 08:14:39 -0700 (PDT) Received: by mail-wg0-f51.google.com with SMTP id b12so941709wgh.30 for ; Mon, 22 Apr 2013 08:14:39 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130422131634.GC22666@cantiga.alporthouse.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: Chris Wilson , Ben Widawsky , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Apr 22, 2013 at 02:16:34PM +0100, Chris Wilson wrote: > 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 Also, shouldn't that kind of decode magic be done in intel_error_decode, where we have all the other stuff? Or is there a special reason? -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch