2014-07-14 16:10 GMT-03:00 Todd Previte <tprevite@xxxxxxxxx>: > These counters are used for Displayort complinace testing to detect error conditions > when executing certain compliance tests. Currently these are used in the EDID tests > to determine if the video mode needs to be set to the preferred mode or the failsafe > mode. > It would be nice if you could cite on the commit message the name of the specification and the name of the test(s) that use it. Usually when I have patches that touch things outside drivers/gpu/drm/i915, I add a Cc tag so I don't forget to email the appropriate list: Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx > Signed-off-by: Todd Previte <tprevite@xxxxxxxxx> > --- > drivers/gpu/drm/drm_dp_helper.c | 2 ++ > include/drm/drm_dp_helper.h | 1 + > 2 files changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c > index 08e33b8..8353051 100644 > --- a/drivers/gpu/drm/drm_dp_helper.c > +++ b/drivers/gpu/drm/drm_dp_helper.c > @@ -654,10 +654,12 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg) > > case DP_AUX_I2C_REPLY_NACK: > DRM_DEBUG_KMS("I2C nack\n"); > + aux->i2c_nack_count++; > return -EREMOTEIO; > > case DP_AUX_I2C_REPLY_DEFER: > DRM_DEBUG_KMS("I2C defer\n"); > + aux->i2c_defer_count++; > usleep_range(400, 500); > continue; > > diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h > index a21568b..3749cb4 100644 > --- a/include/drm/drm_dp_helper.h > +++ b/include/drm/drm_dp_helper.h > @@ -550,6 +550,7 @@ struct drm_dp_aux { > struct mutex hw_mutex; > ssize_t (*transfer)(struct drm_dp_aux *aux, > struct drm_dp_aux_msg *msg); > + uint8_t i2c_nack_count, i2c_defer_count; Does it really need to be uint8_t? I see on patch 7 that you don't really write this value to a place that only accepts uint8_t-sized arguments, so I fear that if we get 256 NACKs or DEFERs we may end up doing the wrong thing. Also, why don't we need to count the native NACKs and DEFERs? > }; > > ssize_t drm_dp_dpcd_read(struct drm_dp_aux *aux, unsigned int offset, > -- > 1.9.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Paulo Zanoni _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx