From patchwork Tue Nov 4 22:17:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5231171 Return-Path: X-Original-To: patchwork-intel-gfx@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 57457C11AD for ; Tue, 4 Nov 2014 22:18:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89FE020173 for ; Tue, 4 Nov 2014 22:18:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A8E632015E for ; Tue, 4 Nov 2014 22:18:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B48636E660; Tue, 4 Nov 2014 14:18:04 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by gabe.freedesktop.org (Postfix) with ESMTP id 410486E65E; Tue, 4 Nov 2014 14:18:03 -0800 (PST) Received: by mail-pd0-f173.google.com with SMTP id v10so14464092pde.18 for ; Tue, 04 Nov 2014 14:18:03 -0800 (PST) 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=BEFnc+ABoghzN0zMaHtLoBZGjGX7eqUyLrb/68f6y9w=; b=JhX5cBTTICf6lmPoo3LkUyrK2SimX36NR8SHNYmkj+Qri2jHelTWTz6DqHQwBpSFMK +OJNqGKCo7Xf0Nq1fE+JBW9qeCuJhwGim0d2R840asBaUCeVFRuUghJctH2Bs5Kpjw3P JY294jQ7dX9Cev9EtsPsG7S/GxwII6Wizw4Y+1Pc/Tdbv2SCXMvYSKGneUk+bEiYIeye cPZVCMHdhqeU0olFJrwXqBoBI9o/4TvD+0nJP6NxIdynhcd1E3UGPHxdYYof1ss9IBW1 xaQQ7eULNyOsgg4EYRXjxYWR8ZyyQo1T9BHRnsZVk176HNzGgqW5THJzV/N8AUEXW2u/ 9uow== X-Received: by 10.66.182.130 with SMTP id ee2mr53272493pac.22.1415139483002; Tue, 04 Nov 2014 14:18:03 -0800 (PST) Received: from localhost.localdomain (ip68-3-234-27.ph.ph.cox.net. [68.3.234.27]) by mx.google.com with ESMTPSA id qu6sm1215152pbc.92.2014.11.04.14.18.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Nov 2014 14:18:02 -0800 (PST) From: Todd Previte To: intel-gfx@lists.freedesktop.org Date: Tue, 4 Nov 2014 15:17:35 -0700 Message-Id: <1415139455-6698-1-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 02/10] drm/i915: Add counters in the drm_dp_aux struct for I2C NACKs and DEFERs X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 compliance testing to detect error conditions when executing tests 4.2.2.4 and 4.2.2.5 in the Displayport Link CTS specificaiton. They determine whether to use the preferred/requested mode or the failsafe mode during these tests. V2: - Addressed previous review feedback - Updated commit message - Changed from uint8_t to uint32_t 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..23082ce 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); + uint32_t i2c_nack_count, i2c_defer_count; }; ssize_t drm_dp_dpcd_read(struct drm_dp_aux *aux, unsigned int offset,