From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 20/24] drm/i915: kill bogus GTIIR clearing in vlv_preinstall hook Date: Fri, 28 Jun 2013 10:01:12 -0700 Message-ID: <20130628170112.GA20241@bwidawsk.net> References: <1371037046-3732-1-git-send-email-daniel.vetter@ffwll.ch> <1371037046-3732-21-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 shiva.localdomain (unknown [209.20.75.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 2FE6DE666D for ; Fri, 28 Jun 2013 09:58:01 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1371037046-3732-21-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 Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Wed, Jun 12, 2013 at 01:37:22PM +0200, Daniel Vetter wrote: > Preinstall disables interrupts, we clear the status register in the > postinstall hook before we actually enable interrupt sources. > > Also add a comment for the curios ring IMR masking, it doesn't > seem to be required on any other platform. > > We seem to have some room for common gt_preinstall/postinstall hooks. > > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i915_irq.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > index 293ee68..b680e1c 100644 > --- a/drivers/gpu/drm/i915/i915_irq.c > +++ b/drivers/gpu/drm/i915/i915_irq.c > @@ -2546,13 +2546,12 @@ static void valleyview_irq_preinstall(struct drm_device *dev) > > /* VLV magic */ > I915_WRITE(VLV_IMR, 0); > + /* Do we really need to clear ring masks for vlv? */ > I915_WRITE(RING_IMR(RENDER_RING_BASE), 0); > I915_WRITE(RING_IMR(GEN6_BSD_RING_BASE), 0); > I915_WRITE(RING_IMR(BLT_RING_BASE), 0); I actually like this for all GENs with rings as a documentation kind of thing. > > /* and GT */ > - I915_WRITE(GTIIR, I915_READ(GTIIR)); > - I915_WRITE(GTIIR, I915_READ(GTIIR)); > I915_WRITE(GTIMR, 0xffffffff); > I915_WRITE(GTIER, 0x0); > POSTING_READ(GTIER); The ordering was wrong here anyway. I think to have the desired effect it should have been 1. mask 2. disable 3. posting read 4. clear 5. posting read 6. clear // potential pending irq But one thing this changes is the double clear, which I feel might be necessary if it is meant to clear the pending interrupt as I would guess. We only seem to do one in postinstall. If this change was intentional, I think we should get Jesse to explain the origin of the original double clear. -- Ben Widawsky, Intel Open Source Technology Center