public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org, drm-intel-fixes@lists.freedesktop.org
Subject: Re: [PATCH 1/4] drm/i915: Actually retry with bit-banging after GMBUS timeout
Date: Wed, 9 Mar 2016 17:13:07 +0200	[thread overview]
Message-ID: <20160309151307.GW10446@intel.com> (raw)
In-Reply-To: <87twki1ale.fsf@intel.com>

On Mon, Mar 07, 2016 at 07:06:37PM +0200, Jani Nikula wrote:
> On Mon, 07 Mar 2016, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > After the GMBUS transfer times out, we set force_bit=1 and
> > return -EAGAIN expecting the i2c core to call the .master_xfer
> > hook again so that we will retry the same transfer via bit-banging.
> > This is in case the gmbus hardware is somehow faulty.
> >
> > Unfortunately we left adapter->retries to 0, meaning the i2c core
> > didn't actually do the retry. Let's tell the core we want one retry
> > when we return -EAGAIN.
> >
> > Note that i2c-algo-bit also uses this retry count for some internal
> > retries, so we'll end up increasing those a bit as well.
> 
> I think I must have confused this with the dp aux i2c adapter retries
> which does get initialized to 3. Meh.
> 
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

Patch pushed to dinq. Thanks for the review.

> 
> >
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Cc: drm-intel-fixes@lists.freedesktop.org
> > Fixes: bffce907d640 ("drm/i915: abstract i2c bit banging fallback in gmbus xfer")
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_i2c.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
> > index deb8282c26d8..52fbe530fc9e 100644
> > --- a/drivers/gpu/drm/i915/intel_i2c.c
> > +++ b/drivers/gpu/drm/i915/intel_i2c.c
> > @@ -664,6 +664,12 @@ int intel_setup_gmbus(struct drm_device *dev)
> >  
> >  		bus->adapter.algo = &gmbus_algorithm;
> >  
> > +		/*
> > +		 * We wish to retry with bit banging
> > +		 * after a timed out GMBUS attempt.
> > +		 */
> > +		bus->adapter.retries = 1;
> > +
> >  		/* By default use a conservative clock rate */
> >  		bus->reg0 = pin | GMBUS_RATE_100KHZ;
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-03-09 15:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-07 15:56 [PATCH 0/4] drm/i915: GMBUS fixes and whatnot ville.syrjala
2016-03-07 15:56 ` [PATCH 1/4] drm/i915: Actually retry with bit-banging after GMBUS timeout ville.syrjala
2016-03-07 17:06   ` Jani Nikula
2016-03-09 15:13     ` Ville Syrjälä [this message]
2016-03-07 15:56 ` [PATCH 2/4] drm/i915: Protect force_bit with gmbus_mutex ville.syrjala
2016-04-11  9:24   ` Jani Nikula
2016-03-07 15:56 ` [PATCH 3/4] drm/i915: Restore GMBUS operation after a failed bit-banging fallback ville.syrjala
2016-04-11  9:50   ` Jani Nikula
2016-04-12 12:17     ` Ville Syrjälä
2016-03-07 15:57 ` [PATCH 4/4] drm/i915: Make GMBUS timeout message DRM_DEBUG_KMS ville.syrjala
2016-04-11  7:29   ` Ville Syrjälä
2016-04-11  8:19     ` Chris Wilson
2016-04-11 15:31       ` Ville Syrjälä
2016-03-08  7:25 ` ✗ Fi.CI.BAT: warning for drm/i915: GMBUS fixes and whatnot Patchwork
2016-03-09 15:12   ` Ville Syrjälä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160309151307.GW10446@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=drm-intel-fixes@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox