From patchwork Tue Aug 14 04:34:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Packard X-Patchwork-Id: 1318041 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id D6D7ADF266 for ; Tue, 14 Aug 2012 04:43:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5140A0871 for ; Mon, 13 Aug 2012 21:43:07 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id BCACEA0889; Mon, 13 Aug 2012 21:35:30 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 3F352760223; Mon, 13 Aug 2012 21:34:49 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from keithp.com ([127.0.0.1]) by localhost (keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rxGxYoFOMWo2; Mon, 13 Aug 2012 21:34:46 -0700 (PDT) Received: by keithp.com (Postfix, from userid 1033) id 22B52BF4239; Mon, 13 Aug 2012 21:34:38 -0700 (PDT) Received: from miki.keithp.com (localhost [127.0.0.1]) by keithp.com (Postfix) with ESMTP id 4AB8AB80018; Mon, 13 Aug 2012 21:34:38 -0700 (PDT) Received: by miki.keithp.com (Postfix, from userid 1001) id 643592F76; Mon, 13 Aug 2012 21:34:56 -0700 (PDT) From: Keith Packard To: intel-gfx@lists.freedesktop.org, Daniel Vetter Subject: [PATCH 3/7] drm/i915: Delay between FDI link training tries. Clear FDI_RX_IIR before training Date: Mon, 13 Aug 2012 21:34:47 -0700 Message-Id: <1344918891-6283-4-git-send-email-keithp@keithp.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1344918891-6283-1-git-send-email-keithp@keithp.com> References: <1344918891-6283-1-git-send-email-keithp@keithp.com> Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Just a bit of cleanup; it appears to have no effect. Signed-off-by: Keith Packard Reviewed-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7106807..95248bd 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -2391,6 +2391,7 @@ static void ironlake_fdi_link_train(struct drm_crtc *crtc) temp |= FDI_LINK_TRAIN_PATTERN_1; I915_WRITE(reg, temp | FDI_TX_ENABLE); + I915_WRITE(FDI_RX_IIR(pipe), FDI_RX_BIT_LOCK); reg = FDI_RX_CTL(pipe); temp = I915_READ(reg); temp &= ~FDI_LINK_TRAIN_NONE; @@ -2398,10 +2399,10 @@ static void ironlake_fdi_link_train(struct drm_crtc *crtc) I915_WRITE(reg, temp | FDI_RX_ENABLE); POSTING_READ(reg); - udelay(150); /* Ironlake workaround, enable clock pointer after FDI enable*/ if (HAS_PCH_IBX(dev)) { + udelay(150); I915_WRITE(FDI_RX_CHICKEN(pipe), FDI_RX_PHASE_SYNC_POINTER_OVR); I915_WRITE(FDI_RX_CHICKEN(pipe), FDI_RX_PHASE_SYNC_POINTER_OVR | FDI_RX_PHASE_SYNC_POINTER_EN); @@ -2409,6 +2410,7 @@ static void ironlake_fdi_link_train(struct drm_crtc *crtc) reg = FDI_RX_IIR(pipe); for (tries = 0; tries < 5; tries++) { + udelay(150); temp = I915_READ(reg); DRM_DEBUG_KMS("FDI_RX_IIR 0x%x\n", temp); @@ -2422,6 +2424,7 @@ static void ironlake_fdi_link_train(struct drm_crtc *crtc) DRM_ERROR("FDI train 1 fail!\n"); /* Train 2 */ + I915_WRITE(FDI_RX_IIR(pipe), FDI_RX_SYMBOL_LOCK); reg = FDI_TX_CTL(pipe); temp = I915_READ(reg); temp &= ~FDI_LINK_TRAIN_NONE; @@ -2435,10 +2438,10 @@ static void ironlake_fdi_link_train(struct drm_crtc *crtc) I915_WRITE(reg, temp); POSTING_READ(reg); - udelay(150); reg = FDI_RX_IIR(pipe); for (tries = 0; tries < 5; tries++) { + udelay(150); temp = I915_READ(reg); DRM_DEBUG_KMS("FDI_RX_IIR 0x%x\n", temp);