From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 2/2] drm/i915: Simplify the IVB interrupt handler Date: Sun, 06 May 2012 16:44:59 +0100 Message-ID: <1336319107_167879@CP5-2952> References: <1335948733-20561-1-git-send-email-chris@chris-wilson.co.uk> <1335948733-20561-2-git-send-email-chris@chris-wilson.co.uk> <20120506153750.GB4756@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (smtp.fireflyinternet.com [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id 991099E75A for ; Sun, 6 May 2012 08:45:14 -0700 (PDT) In-Reply-To: <20120506153750.GB4756@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 Sun, 6 May 2012 17:37:50 +0200, Daniel Vetter wrote: > On Wed, May 02, 2012 at 09:52:13AM +0100, Chris Wilson wrote: > > Reduce the number of reads and writes required for handling a single > > interrupt. > > > > Signed-off-by: Chris Wilson > > Ok, I've looked at this again and imo it does too much. On a quick look we > have adding the pch_iir argument to pch_irq_handler and restructuring the > register read/write sequence in the actual handler. The latter seems to > require that we unconditionally return IRQ_HANDLED. This being an MS| directed, and never shared, interrupt, this handler should not be called unless we have something to do. A IRQ_NONE return here is a serious bug. Another bug is that we read the PCH IIR twice and only write back the original value, opening the possiblity of handling the same interrupt twice. All of which is sumised by reducing the number of reads and writes required for handing a single interrupt. -Chris -- Chris Wilson, Intel Open Source Technology Centre