From patchwork Thu Oct 9 15:33:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5058881 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 16338C11AC for ; Thu, 9 Oct 2014 15:34:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4F9CA2012F for ; Thu, 9 Oct 2014 15:34:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 678EB2010E for ; Thu, 9 Oct 2014 15:34:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E4B696E1FE; Thu, 9 Oct 2014 08:34:11 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-oi0-f48.google.com (mail-oi0-f48.google.com [209.85.218.48]) by gabe.freedesktop.org (Postfix) with ESMTP id EC47E6E1F7 for ; Thu, 9 Oct 2014 08:34:10 -0700 (PDT) Received: by mail-oi0-f48.google.com with SMTP id g201so3421198oib.21 for ; Thu, 09 Oct 2014 08:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wq/YvDtmd2NNPZaWDK2nBDcyVS/CqDdFQYajGasdoAE=; b=W/Rd6YdyuKNHdXCKAwHNmAIMQaS9wGUmjbZ4y3Z1IH3MLWmVmEW33TPzE6FkgRL5fO K2SV6aMU3C4t/hlZFsbFF+6aEjDd6nlQaoxLTN9xR1cNvDejFRKDVwSOvFLH959JFI5M 4O8ADL7k+LBRJuThXmixVqTonO/gakkbZXRZbVKoEMmCqmSkkVKTVGP2Rp0disL35eFv zFBhRNT31HzuXwRGHKzTRTrACfilg0Mgo8C/hMU13NSLl2YpRTqC858Y3UfWuGz0bp+p wTuMznxCStAKPhRC4P4PxZAhQ+U6i6/pDv7wM9O7S/8T62KhLdvrphpOeW6JWLTgdOto sdkw== X-Received: by 10.66.119.175 with SMTP id kv15mr555814pab.30.1412868850361; Thu, 09 Oct 2014 08:34:10 -0700 (PDT) Received: from localhost.localdomain (ip72-201-95-47.ph.ph.cox.net. [72.201.95.47]) by mx.google.com with ESMTPSA id sb2sm917218pbc.24.2014.10.09.08.34.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Oct 2014 08:34:09 -0700 (PDT) From: Todd Previte To: tprevite@gmail.com Subject: [PATCH 02/10] drm/i915: Add counters in the drm_dp_aux struct for I2C NACKs and DEFERs Date: Thu, 9 Oct 2014 08:33:26 -0700 Message-Id: <1412868814-47925-3-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412868814-47925-1-git-send-email-tprevite@gmail.com> References: <1412868814-47925-1-git-send-email-tprevite@gmail.com> Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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,