From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] drm/i915: Reset GMBUS controller after NAK Date: Wed, 30 Mar 2011 17:59:51 +0100 Message-ID: <1bdc18$k257pk@fmsmga002.fm.intel.com> References: <1301501231-27133-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id D570E9E765 for ; Wed, 30 Mar 2011 09:59:59 -0700 (PDT) In-Reply-To: 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: Keith Packard , intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, 30 Mar 2011 09:48:25 -0700, Keith Packard wrote: > On Wed, 30 Mar 2011 17:07:11 +0100, Chris Wilson wrote: > > > +clear_err: > > + I915_WRITE(GMBUS1 + reg_offset, GMBUS_SW_CLR_INT); > > + POSTING_READ(GMBUS1 + reg_offset); > > + I915_WRITE(GMBUS1 + reg_offset, 0); > > Any posting read needed here? I'm not even sure we need the first posting read. Maybe it should be a wait_for(I915_READ(GMBUS1 + reg_offset) & GMBUS_SW_CLR_INT, 100) to be clearer that we are simply giving the hardware the chance to assert the bit and reset before re-enabling. > > + > > +done: > > + I915_WRITE(GMBUS0 + reg_offset, 0); > > What's this new write doing in the non-error path? Do we need a posting > read after it? No, GMBUS0 is not read until the very first phase of the data cycle. And the very first thing we do in the next xfer is a write to GMBUS0 of the port settings. I just thought that explicitly marking the GMBUS controller as disabled when not in use by us would lead to less confusion in future. -Chris -- Chris Wilson, Intel Open Source Technology Centre