Message ID | e526f5a909d8fdb0f806d03671681bf1c0283e0f.1379684248.git.jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 09/20/2013 06:42 AM, Jani Nikula wrote: > There is no clear cut rules or specs for the retry interval, as there > are many factors that affect overall response time. Increase the > interval, and even more so on branch devices which may have limited i2c > bit rates. > > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > --- > drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > index 6626514..3afbea9 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -678,7 +678,18 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, > DRM_DEBUG_KMS("aux_ch native nack\n"); > return -EREMOTEIO; > case AUX_NATIVE_REPLY_DEFER: > - udelay(100); > + /* > + * For now, just give more slack to branch devices. We > + * could check the DPCD for I2C bit rate capabilities, > + * and if available, adjust the interval. We could also > + * be more careful with DP-to-Legacy adapters where a > + * long legacy cable may force very low I2C bit rates. > + */ > + if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & > + DP_DWN_STRM_PORT_PRESENT) > + usleep_range(500, 600); > + else > + usleep_range(300, 400); > continue; > default: > DRM_ERROR("aux_ch invalid native reply 0x%02x\n", Those look like reasonable values to me. [Reviewed-by]: Todd Previte <tprevite@gmail.com <mailto:tprevite@gmail.com>>
On Fri, Sep 20, 2013 at 01:56:20PM -0700, Todd Previte wrote: > On 09/20/2013 06:42 AM, Jani Nikula wrote: > >There is no clear cut rules or specs for the retry interval, as there > >are many factors that affect overall response time. Increase the > >interval, and even more so on branch devices which may have limited i2c > >bit rates. > > > >Signed-off-by: Jani Nikula <jani.nikula@intel.com> > >--- > > drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++++- > > 1 file changed, 12 insertions(+), 1 deletion(-) > > > >diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > >index 6626514..3afbea9 100644 > >--- a/drivers/gpu/drm/i915/intel_dp.c > >+++ b/drivers/gpu/drm/i915/intel_dp.c > >@@ -678,7 +678,18 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, > > DRM_DEBUG_KMS("aux_ch native nack\n"); > > return -EREMOTEIO; > > case AUX_NATIVE_REPLY_DEFER: > >- udelay(100); > >+ /* > >+ * For now, just give more slack to branch devices. We > >+ * could check the DPCD for I2C bit rate capabilities, > >+ * and if available, adjust the interval. We could also > >+ * be more careful with DP-to-Legacy adapters where a > >+ * long legacy cable may force very low I2C bit rates. > >+ */ > >+ if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & > >+ DP_DWN_STRM_PORT_PRESENT) > >+ usleep_range(500, 600); > >+ else > >+ usleep_range(300, 400); > > continue; > > default: > > DRM_ERROR("aux_ch invalid native reply 0x%02x\n", > > Those look like reasonable values to me. > > [Reviewed-by]: Todd Previte <tprevite@gmail.com > <mailto:tprevite@gmail.com>> Your mailer sends out html+plaintext multipart mails and in the plaintext section your r-b tags look rather funny. Can you please fix that? Thanks, Daniel
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 6626514..3afbea9 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -678,7 +678,18 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode, DRM_DEBUG_KMS("aux_ch native nack\n"); return -EREMOTEIO; case AUX_NATIVE_REPLY_DEFER: - udelay(100); + /* + * For now, just give more slack to branch devices. We + * could check the DPCD for I2C bit rate capabilities, + * and if available, adjust the interval. We could also + * be more careful with DP-to-Legacy adapters where a + * long legacy cable may force very low I2C bit rates. + */ + if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & + DP_DWN_STRM_PORT_PRESENT) + usleep_range(500, 600); + else + usleep_range(300, 400); continue; default: DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
There is no clear cut rules or specs for the retry interval, as there are many factors that affect overall response time. Increase the interval, and even more so on branch devices which may have limited i2c bit rates. Signed-off-by: Jani Nikula <jani.nikula@intel.com> --- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)