From patchwork Thu Oct 9 15:38:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5058921 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DDEB59F349 for ; Thu, 9 Oct 2014 15:38:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29625201C8 for ; Thu, 9 Oct 2014 15:38:49 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 41B75201BC for ; Thu, 9 Oct 2014 15:38:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2C82B6E37E; Thu, 9 Oct 2014 08:38:47 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yh0-f41.google.com (mail-yh0-f41.google.com [209.85.213.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C30A6E380; Thu, 9 Oct 2014 08:38:45 -0700 (PDT) Received: by mail-yh0-f41.google.com with SMTP id i57so866867yha.14 for ; Thu, 09 Oct 2014 08:38:45 -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=FhG4/0ym+vy1P3xn4RnTkq4wmOhWPL80HrGtgGWqxX4hk+k/OXA7S2pYClEk9jD2ey TUgu7OHe8/anIIZv57DU83XoyBEf58YRajMypNmZWEFe/bPuSDY4kRfA5K+uspemiw5I RxCBVku+PWdBAPJ1WGMdZyO4S7XKizafcpFCQd1BFc6B2mM/SPRltV2Ie+uefInxT7Bg gQ+rZFb/4JuqU1QsDMp510O1GzYxhNfsV5/8g2exRc/KIxrgw8i3BqOVl3j/RAYwMUY6 YRHTkkTccqmBM3dqhDJaKyVmiSGNx1GppU0eTdKau4K+h1WELYvqsmFhfNW+9gTXjIrT 3u5A== X-Received: by 10.70.125.197 with SMTP id ms5mr33510pdb.166.1412869124935; Thu, 09 Oct 2014 08:38:44 -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 y1sm844710pbw.89.2014.10.09.08.38.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Oct 2014 08:38:43 -0700 (PDT) From: Todd Previte To: intel-gfx@lists.freedesktop.org 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:38:02 -0700 Message-Id: <1412869090-48010-3-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412869090-48010-1-git-send-email-tprevite@gmail.com> References: <1412869090-48010-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,