From patchwork Tue Oct 2 20:51:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1538841 Return-Path: X-Original-To: patchwork-intel-gfx@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 1597BDFFAD for ; Tue, 2 Oct 2012 21:00:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 222F99F385 for ; Tue, 2 Oct 2012 14:00:33 -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 AB0229EEC5 for ; Tue, 2 Oct 2012 13:53:20 -0700 (PDT) Received: by mail-yh0-f49.google.com with SMTP id j52so541704yhj.36 for ; Tue, 02 Oct 2012 13:53:20 -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:x-mailer:in-reply-to:references; bh=b3s1280FvKnoeBlX91srIqFgTK3zQeHP7QzPxOBOl9A=; b=s1iCaopE5q1m3lf6zAn0Z+9MN+XW8cMwD9ytcdKcfU6R3qRIiC6OX+YB9GWRTpdH1+ aBr2Hub7Dyml2LKhhuZqhcjGr0D6hoP3ngOMKfqoAWEJ8pa2BbgRqqQBJCihhicDqJof pNsKiE8UdoxwU08x9D2K6JgeuQvtju+WvBVJJizRQtCv19lyTGIY7zbrfRMJSgHVTVAG jmmgmn1TR81HxpeAyLF0oaFzkg4liqbGnyxyyFXoKnGB7MZd5VD4VQLtlN25HfSEsCKZ gOTWTPptHQ/DMDrLjbpAK/xn/f4B12JEWihQjv+JXXN7VBGODCjt6VE8YQhchGdUuthC 7FTg== Received: by 10.101.22.15 with SMTP id z15mr1495103ani.26.1349211200393; Tue, 02 Oct 2012 13:53:20 -0700 (PDT) Received: from vicky.domain.invalid ([187.59.149.118]) by mx.google.com with ESMTPS id f1sm2117168ank.12.2012.10.02.13.53.19 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 13:53:19 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 2 Oct 2012 17:51:49 -0300 Message-Id: <1349211142-4802-15-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1349211142-4802-1-git-send-email-przanoni@gmail.com> References: <1349211142-4802-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 14/47] drm/i915: add DP support to intel_ddi_disable_port X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org From: Paulo Zanoni Just a missing register. There is no problem to run this code when the output is HDMI. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_ddi.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index ad3ecd6..03a9d34 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -1103,14 +1103,23 @@ void intel_ddi_post_disable(struct intel_encoder *intel_encoder) struct drm_i915_private *dev_priv = encoder->dev->dev_private; enum port port = intel_ddi_get_encoder_port(intel_encoder); uint32_t val; + bool wait = false; val = I915_READ(DDI_BUF_CTL(port)); if (val & DDI_BUF_CTL_ENABLE) { val &= ~DDI_BUF_CTL_ENABLE; I915_WRITE(DDI_BUF_CTL(port), val); - intel_wait_ddi_buf_idle(dev_priv, port); + wait = true; } + val = I915_READ(DP_TP_CTL(port)); + val &= ~(DP_TP_CTL_ENABLE | DP_TP_CTL_LINK_TRAIN_MASK); + val |= DP_TP_CTL_LINK_TRAIN_PAT1; + I915_WRITE(DP_TP_CTL(port), val); + + if (wait) + intel_wait_ddi_buf_idle(dev_priv, port); + I915_WRITE(PORT_CLK_SEL(port), PORT_CLK_SEL_NONE); }