From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 6/6] drm/i915: Kick start the rings Date: Tue, 22 Apr 2014 21:25:20 +0200 Message-ID: <20140422192520.GC10722@phenom.ffwll.local> References: <1397031585-30211-1-git-send-email-chris@chris-wilson.co.uk> <1397031585-30211-6-git-send-email-chris@chris-wilson.co.uk> <92648605EABDA246B775AAB04C95A7A3012DA849@IRSMSX103.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f41.google.com (mail-ee0-f41.google.com [74.125.83.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 79BD26E596 for ; Tue, 22 Apr 2014 12:25:25 -0700 (PDT) Received: by mail-ee0-f41.google.com with SMTP id t10so54245eei.0 for ; Tue, 22 Apr 2014 12:25:24 -0700 (PDT) Content-Disposition: inline In-Reply-To: <92648605EABDA246B775AAB04C95A7A3012DA849@IRSMSX103.ger.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Mateo Lozano, Oscar" Cc: "intel-gfx@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org On Tue, Apr 22, 2014 at 01:06:45PM +0000, Mateo Lozano, Oscar wrote: > > Subject: [Intel-gfx] [PATCH 6/6] drm/i915: Kick start the rings > > > > On g4x, we have an issue where the register write to setup the rings do not > > always take. However, it appears that the current check also passes only by > > chance, a second reading of the register returns a different broekn value - but > > the GPU appears to function. Based on that observation, lets try feeding a nop > > into the ring and seeing if it advances as part of our startup sanity checks. > > > > References: https://bugs.freedesktop.org/show_bug.cgi?id=76554 > > Signed-off-by: Chris Wilson > > --- > > drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c > > b/drivers/gpu/drm/i915/intel_ringbuffer.c > > index a8c73a0d935d..bc52645fa8d5 100644 > > --- a/drivers/gpu/drm/i915/intel_ringbuffer.c > > +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c > > @@ -514,10 +514,14 @@ static int init_ring_common(struct intel_ring_buffer > > *ring) > > ((ring->size - PAGE_SIZE) & RING_NR_PAGES) > > | RING_VALID); > > > > + iowrite32(MI_NOOP, ring->virtual_start + 0); > > + iowrite32(MI_NOOP, ring->virtual_start + 4); > > + ring->write_tail(ring, 8); > > Maybe add a comment in the code about why we are doing this? (otherwise, it looks a bit magical) Yeah, this is a bit too much magic. Also it looks like it doesn't really help the bug report with his gm45, so I think I'll punt on this one for now. All other patches merged with the 2 small suggestions from Oscar applied while merging. Thanks for patches&review. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch