From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 4/4] drm/i915: use gmbus irq to wait for gmbus idle Date: Thu, 06 Sep 2012 14:06:05 +0100 Message-ID: <6c3329$5soj8t@orsmga002.jf.intel.com> References: <1346915402-9399-1-git-send-email-daniel.vetter@ffwll.ch> <1346915402-9399-4-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 mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 1889E9E7D3 for ; Thu, 6 Sep 2012 06:06:14 -0700 (PDT) In-Reply-To: <1346915402-9399-4-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: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Thu, 6 Sep 2012 09:10:02 +0200, Daniel Vetter wrote: > GMBUS_ACTIVE has inverted sense and so doesn't fit into the > wait_hw_status helper, hence create a new gmbus_wait_idle functions. > Also, we only care about the idle irq event and nothing else, which > allows us to use the wait_event_timeout helper directly without > jumping through hoops to catch NAKs. > > Since gen2/3 don't have gmbus interrupts, handle them separately with > the old wait_for macro. > > This shaves another few ms off reading EDID from a hdmi screen on my > testbox here. EDID reading with interrupt driven gmbus is now as fast > as with busy-looping gmbus at 28 ms here (with negligible cpu > overhead). I'll put my neck on the line and say I can't spot any other mistakes: Reviewed-by: Chris Wilson A couple of triffling things, you could use whitespace more uniformly and the comment for only enabling one interrupt source could do with the explanation that then means we also have to poll for NAK. -Chris -- Chris Wilson, Intel Open Source Technology Centre