From patchwork Thu Oct 9 15:38:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5149741 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 216F6C11AC for ; Fri, 24 Oct 2014 21:25:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6115C201C7 for ; Fri, 24 Oct 2014 21:25:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 31D7020265 for ; Fri, 24 Oct 2014 21:25:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CA806E7AB; Fri, 24 Oct 2014 14:23:25 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yh0-f49.google.com (mail-yh0-f49.google.com [209.85.213.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 8865B6E382 for ; Thu, 9 Oct 2014 08:38:49 -0700 (PDT) Received: by mail-yh0-f49.google.com with SMTP id a41so845533yho.8 for ; Thu, 09 Oct 2014 08:38:49 -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=UuGb8VJm+RqcRxEr4raywfBcKXF7omZtXEwdXju6KjA=; b=t9/aNjdtTW5vwbm40j0g7pA00jpgf1AOkB3aQRKXW0fvTcJ97LfDWlIbBz04NzSg/U 1d/Ikv6W/QUa19+FUUchPdvsI7HGjmZPmeF24pR5GeUfL7R8bK0cOiUEKhZpsmS/xhpq oyBdYh4ogjbTvt20PA5Hc8qVr0cSBin27u9cwwnq5zpStj4SCM8gcVvvcfKSrK67edfZ 4FHqb5VD4v0N/mHZauuDHuH894jkP5TOVHtwn04VOw2NQzfIuNut5FvmwuXCLa8NB2a4 CY7EWagCz9XCSH2MKI6/lVir2FgnppNaEtAW57ooRvJPqW7JjpAF8WByIQAQp+yoR7vY V8vw== X-Received: by 10.70.65.7 with SMTP id t7mr452609pds.133.1412869129047; Thu, 09 Oct 2014 08:38:49 -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.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Oct 2014 08:38:48 -0700 (PDT) From: Todd Previte To: intel-gfx@lists.freedesktop.org Date: Thu, 9 Oct 2014 08:38:04 -0700 Message-Id: <1412869090-48010-5-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> Subject: [Intel-gfx] [PATCH 04/10] drm/i915: Add a delay in Displayport AUX transactions for compliance testing X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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=-5.5 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 The Displayport Link Layer Compliance Testing Specification 1.2 rev 1.1 specifies that repeated AUX transactions after a failure (no response / invalid response) must have a minimum delay of 400us before the resend can occur. Tests 4.2.1.1 and 4.2.1.2 are two tests that require this specifically. Signed-off-by: Todd Previte --- drivers/gpu/drm/i915/intel_dp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 952dfa3..a7acc61 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -799,9 +799,14 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, DP_AUX_CH_CTL_TIME_OUT_ERROR | DP_AUX_CH_CTL_RECEIVE_ERROR); + /* DP compliance requires 400us delay for errors + and timeouts (DP CTS 1.2 Core Rev 1.1, 4.2.1.1 + & 4.2.1.2) */ if (status & (DP_AUX_CH_CTL_TIME_OUT_ERROR | - DP_AUX_CH_CTL_RECEIVE_ERROR)) + DP_AUX_CH_CTL_RECEIVE_ERROR)) { + udelay(400); continue; + } if (status & DP_AUX_CH_CTL_DONE) break; }