From patchwork Thu Feb 19 03:00:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5849701 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9FF8F9F36A for ; Thu, 19 Feb 2015 03:00:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF21C20221 for ; Thu, 19 Feb 2015 03:00:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 14A7620225 for ; Thu, 19 Feb 2015 03:00:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E9236E3C4; Wed, 18 Feb 2015 19:00:51 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pa0-f54.google.com (mail-pa0-f54.google.com [209.85.220.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 954116E413 for ; Wed, 18 Feb 2015 19:00:50 -0800 (PST) Received: by padbj1 with SMTP id bj1so6052870pad.5 for ; Wed, 18 Feb 2015 19:00:50 -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=cpEBgVIYf32UV7qoFy5ONqFFw9vVEnHmFm4MDcSb/Cc=; b=QypujlEcrtpxfyDYHbCxNTOvrRKSxrujyziM3Epx9gwm29KXA461wFrTBUxZTr0R51 hZush8a9f54uJ4jnFg5oTLpg+uTJWq+fjH3x0JFOQcnB4Q/r/4tudZZ14vv32VEIQDWs +buwbS7PlETIDKmFyGw0s+JlimwDj4C17kzLvxI7wjzsbjd9s2NYgH0F+te4ZGF6GG95 nSr/c5s1BTD3seu6liGbT8H6NK/GNwaH6lZtUGSNR49YeQnJ/DjOx/Y5juPXXQdvklXg LfROcaeg3m4V1opu8AbLMCv5WfKxWlwOskTthxTLJKJoG52A0G1iD8SV7kPObSzeRcgE zabQ== X-Received: by 10.66.144.201 with SMTP id so9mr4046521pab.78.1424314850394; Wed, 18 Feb 2015 19:00:50 -0800 (PST) Received: from localhost.localdomain (ip70-162-72-208.ph.ph.cox.net. [70.162.72.208]) by mx.google.com with ESMTPSA id je2sm21953646pbd.44.2015.02.18.19.00.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Feb 2015 19:00:49 -0800 (PST) From: Todd Previte To: intel-gfx@lists.freedesktop.org Date: Wed, 18 Feb 2015 20:00:31 -0700 Message-Id: <1424314837-32434-4-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1424314837-32434-1-git-send-email-tprevite@gmail.com> References: <1424314837-32434-1-git-send-email-tprevite@gmail.com> Subject: [Intel-gfx] [PATCH 3/9] drm/i915: Add a delay in Displayport AUX transactions for compliance testing 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.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 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. V2: - Changed udelay() to usleep_range() V3: - Removed extraneous check for timeout - Updated comment to reflect this change Signed-off-by: Todd Previte --- drivers/gpu/drm/i915/intel_dp.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 280ae7a..5d7b7f3 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -877,9 +877,15 @@ intel_dp_aux_ch(struct intel_dp *intel_dp, DP_AUX_CH_CTL_TIME_OUT_ERROR | DP_AUX_CH_CTL_RECEIVE_ERROR); - if (status & (DP_AUX_CH_CTL_TIME_OUT_ERROR | - DP_AUX_CH_CTL_RECEIVE_ERROR)) + /* DP CTS 1.2 Core Rev 1.1, 4.2.1.1 & 4.2.1.2 + 400us delay required for errors and timeouts + Timeout errors from the HW already meet this + requirement so skip to next iteration + */ + if (status & DP_AUX_CH_CTL_RECEIVE_ERROR) { + usleep_range(400, 500); continue; + } if (status & DP_AUX_CH_CTL_DONE) break; }