From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 1/3] drm/i915: close PM interrupt masking races in the irq handler Date: Sun, 4 Sep 2011 10:09:10 -0700 Message-ID: <20110904100910.56ffb1f7@bwidawsk.net> References: <20110904084953.16cd10a2@bwidawsk.net> <1315150502-12537-1-git-send-email-daniel.vetter@ffwll.ch> <1315150502-12537-2-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 646B89E89D for ; Sun, 4 Sep 2011 10:08:52 -0700 (PDT) In-Reply-To: <1315150502-12537-2-git-send-email-daniel.vetter@ffwll.ch> 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, 4 Sep 2011 17:35:00 +0200 Daniel Vetter wrote: > Quoting Chris Wilson's more concise description: > > "Ah I think I see the problem. As you point out we only mask the > current interrupt received, so that if we have a task pending (and so > IMR != 0) we actually unmask the pending interrupt and so could > receive it again before the tasklet is finally kicked off by the > grumpy scheduler." > > So we need the hw to issue PM interrupts A, B, A while the scheduler > is hating us and refuses to run the rps work item. On receiving PM > interrupt A we hit the > WARN because > > dev_priv->pm_iir == PM_A | PM_B > > Also add a posting read as suggested by Chris to ensure proper > ordering of the writes to PMIMR and PMIIR. Just in case somebody > weakens write ordering. > > Signed-off-by: Daniel Vetter Reviewed-by: Ben Widawsky