From: Chris Wilson Subject: Re: [PATCH 04/15] drm/i915: really clear the IIR registers Date: Wed, 24 Jul 2013 12:11:56 +0100 Message-ID: <20130724111156.GD3299@cantiga.alporthouse.com> References: <1374618835-28120-1-git-send-email-przanoni@gmail.com> <1374618835-28120-5-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (s16502780.onlinehome-server.info [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FD83E68AB for ; Wed, 24 Jul 2013 04:12:05 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1374618835-28120-5-git-send-email-przanoni@gmail.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: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Tue, Jul 23, 2013 at 07:33:44PM -0300, Paulo Zanoni wrote: > From: Paulo Zanoni > > As written on our docs, the IIR registers are capable of storing 2 > interrupts, so if we write once to them there's no guarantee they will > become zero. So on this patch we write to the register, read to check > if it's zero, and then write again in case it's needed. > > Also replace I915_WRITE(iir, I915_READ(iir)) with I915_WRITE(iir, > 0xffffffff), and then move the POSTING_READs on IER because we removed > the extra IIR read. Just write(read(iir)) twice and add a comment why. -Chris -- Chris Wilson, Intel Open Source Technology Centre