From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Todd Previte" Subject: RE: [PATCH 02/10] drm/i915: Add counters in the drm_dp_aux struct for I2C NACKs and DEFERs Date: Thu, 9 Oct 2014 08:36:56 -0700 Message-ID: <001001cfe3d6$dd246490$976d2db0$@gmail.com> References: <1412868814-47925-1-git-send-email-tprevite@gmail.com> <1412868814-47925-3-git-send-email-tprevite@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-yh0-f43.google.com (mail-yh0-f43.google.com [209.85.213.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E60C6E21B for ; Thu, 9 Oct 2014 08:36:51 -0700 (PDT) Received: by mail-yh0-f43.google.com with SMTP id f73so858303yha.16 for ; Thu, 09 Oct 2014 08:36:49 -0700 (PDT) Received: from Panzer (ip72-201-95-47.ph.ph.cox.net. [72.201.95.47]) by mx.google.com with ESMTPSA id bf2sm932247pbb.13.2014.10.09.08.36.48 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Oct 2014 08:36:48 -0700 (PDT) In-Reply-To: <1412868814-47925-3-git-send-email-tprevite@gmail.com> Content-Language: en-us List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Sorry for the spam - Ignore the duplicates. There will be one more coming when I post this series to intel-gfx. -T -----Original Message----- From: Todd Previte [mailto:tprevite@gmail.com] Sent: Thursday, October 09, 2014 8:33 AM To: tprevite@gmail.com Cc: dri-devel@lists.freedesktop.org Subject: [PATCH 02/10] drm/i915: Add counters in the drm_dp_aux struct for I2C NACKs and DEFERs 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. Cc: dri-devel@lists.freedesktop.org Signed-off-by: Todd Previte --- 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 8edeed0..45f3ee8 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -551,6 +551,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; }; ssize_t drm_dp_dpcd_read(struct drm_dp_aux *aux, unsigned int offset, -- 1.9.1