From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 14/14] drm/i915: inline enable/disable_irq into ring->get/put_irq Date: Thu, 12 Apr 2012 18:03:30 -0700 Message-ID: <20120412180330.60e1f99b@bwidawsk.net> References: <1334175179-1514-1-git-send-email-daniel.vetter@ffwll.ch> <1334175179-1514-15-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 4883C9E777 for ; Thu, 12 Apr 2012 18:03:37 -0700 (PDT) In-Reply-To: <1334175179-1514-15-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, 11 Apr 2012 22:12:59 +0200 Daniel Vetter wrote: > Now that these are properly refactored this additional indirection > doesn't really buy us anything but confusion. Hence inline them. > > This duplicates the ironlake gt enable/disable code snippet, but we've > already separate ilk from gen6+ gt irq in i915_irq.c, so I think this > makes more sense. > > Signed-Off-by: Daniel Vetter Bikeshed: While doing all this, I think put/get irq is really terribly named. I was a much bigger fan of the enable disable. Also, you could use a bit of flow control to write to the correct IMR register and not duplicate functions at all. You already do the POSTING_READ so performance shouldn't matter. Something like... uint32_t imr = GEN(dev) >= 5 ? GTIMR: IMR;