From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: don't return -ENXIO from gmbus xfer Date: Sun, 20 May 2012 17:19:16 +0200 Message-ID: <20120520151916.GB5145@phenom.ffwll.local> References: <1336974981-5176-1-git-send-email-daniel.vetter@ffwll.ch> <1337458212-15791-1-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 mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B5529E83C for ; Sun, 20 May 2012 08:17:57 -0700 (PDT) Received: by wgbdr1 with SMTP id dr1so3355078wgb.12 for ; Sun, 20 May 2012 08:17:57 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1337458212-15791-1-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 , Daniel Kurtz List-Id: intel-gfx@lists.freedesktop.org On Sat, May 19, 2012 at 10:10:12PM +0200, Daniel Vetter wrote: > ... too much risk for flaky edid transfers. > > This regression has been introduced in > > commit e646d5773572bf52017983d758bdf05777dc5600 > Author: Daniel Kurtz > Date: Fri Mar 30 19:46:38 2012 +0800 > > drm/i915/intel_i2c: always wait for IDLE before clearing NAK > > This patch keeps the improved NAK handling on the hw side, but reverts > the change to return -ENXIO in case the gmbus controller reports a > NAK. > > Cc: Daniel Kurtz Hi Daniel, Can you please take a look at this one and smash your r-b onto it if you agree? Thanks, Daniel > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49518 > Reported-and-Tested-by: Julian Simioni > Signed-Off-by: Daniel Vetter > --- > drivers/gpu/drm/i915/intel_i2c.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c > index e04255e..0588d8e 100644 > --- a/drivers/gpu/drm/i915/intel_i2c.c > +++ b/drivers/gpu/drm/i915/intel_i2c.c > @@ -418,10 +418,11 @@ clear_err: > * If no ACK is received during the address phase of a transaction, > * the adapter must report -ENXIO. > * It is not clear what to return if no ACK is received at other times. > - * So, we always return -ENXIO in all NAK cases, to ensure we send > - * it at least during the one case that is specified. > + * > + * Unfortunately we can't afford false positives in returning -ENXIO, > + * hence never return -ENXIO. > */ > - ret = -ENXIO; > + ret = i; > goto out; > > timeout: > -- > 1.7.10 > -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48