From patchwork Thu Oct 9 15:36:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5058891 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 7A379C11AC for ; Thu, 9 Oct 2014 15:36:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B18E92012F for ; Thu, 9 Oct 2014 15:36:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D3EB62012B for ; Thu, 9 Oct 2014 15:36:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A0386E21B; Thu, 9 Oct 2014 08:36:53 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:content-transfer-encoding:thread-index :content-language; bh=11b3U9Qdq2Ku82GrwsAp5fEjMgI0/if0cfq3IaYu5E4=; b=GQalR0O/5HeS1RsSKYYNVHTldwKbnaPUq288gIf6uBddkBQNdGFp2bNzX82ssgBDB0 fd2NqY2mHOpBsHX5HwgGWJi6yFBY+GBJVpKnh56XTA7qLETIi8i6QsYLG2NrNKNUxSh1 nCVcw/VFEymWYKM9yOhB//5y9h94gwhzHX1Qz5gA2Osz/kQUsGUjzHff/FeU0K2C7j9W S8BAOwfnMZs0N/NoNGp7Jqy5X0fPOFgt5r8fF2boxzu8N74XV3eoMnn+xLfZPTeVP5hF 90FwxJMppfgHbTyyPu3auZO9QqnyXyw/ZEqKohFOTE63By0X3luKv2ZIUrhWh4m6X1Qb G/Kg== X-Received: by 10.66.182.227 with SMTP id eh3mr516545pac.68.1412869009742; 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) From: "Todd Previte" To: References: <1412868814-47925-1-git-send-email-tprevite@gmail.com> <1412868814-47925-3-git-send-email-tprevite@gmail.com> In-Reply-To: <1412868814-47925-3-git-send-email-tprevite@gmail.com> 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> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQGyH905B0zohpgRlW8qH+AYeD2D/AJetRnunFB4ExA= Content-Language: en-us 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: , 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 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(+) -- 1.9.1 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,