From patchwork Wed Dec 10 23:53:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5473281 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 6BA01BEEA8 for ; Wed, 10 Dec 2014 23:54:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C0672018E for ; Wed, 10 Dec 2014 23:54:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 8D63C200DF for ; Wed, 10 Dec 2014 23:54:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05AD76E702; Wed, 10 Dec 2014 15:54:01 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 440A16E706 for ; Wed, 10 Dec 2014 15:54:00 -0800 (PST) Received: by mail-pa0-f43.google.com with SMTP id kx10so3830818pab.2 for ; Wed, 10 Dec 2014 15:54:00 -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=nmGsSg2c0CskRL/lTSopNF7nqL4wFN3gWXSjdiVDQdA=; b=ZDU8yREeZeLNMTawox7aJpieNH3UE5cXre4eeHF1voKHVsjWsJfjFuereYXcBeWMOu 1k5S0cS4v8LdK0ZewSUO1WXKMkJqv5ySt83SqRPOJ/5Ayj1xT4eedSz16SATWxodUGGP 76Q9JY0wvkSPAxborzdqpgUMUNR5JMTTv0ktAE2/GjqblVGzl8GvyqRxRRAH/30j8OdF cjPTnhR5MsNgjvttp0uf/XMc/O9JQEVRHB32Sbgh0XD45uwdFmIsQEzGllKmOOoOlXrE przT4pLba+6iuVatZy/gkkpxZSsclr8lsCrCcOD2yPEiNWu42wVYHEPxCrsUgrQop/EK 4JOg== X-Received: by 10.70.42.98 with SMTP id n2mr11514094pdl.139.1418255640076; Wed, 10 Dec 2014 15:54:00 -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 gy10sm5164958pbd.67.2014.12.10.15.53.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Dec 2014 15:53:59 -0800 (PST) From: Todd Previte To: intel-gfx@lists.freedesktop.org Date: Wed, 10 Dec 2014 16:53:03 -0700 Message-Id: <1418255597-4716-4-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418255597-4716-1-git-send-email-tprevite@gmail.com> References: <1418255597-4716-1-git-send-email-tprevite@gmail.com> Subject: [Intel-gfx] [PATCH 03/17] 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() 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 1b452cc..b6f5a72 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -876,9 +876,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)) { + usleep_range(400, 500); continue; + } if (status & DP_AUX_CH_CTL_DONE) break; }