From patchwork Mon Oct 15 18:51:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1595111 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 005A13FD86 for ; Mon, 15 Oct 2012 18:54:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E2DB59F727 for ; Mon, 15 Oct 2012 11:54:13 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gh0-f177.google.com (mail-gh0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTP id BA6409F738 for ; Mon, 15 Oct 2012 11:52:10 -0700 (PDT) Received: by mail-gh0-f177.google.com with SMTP id f20so1349193ghb.36 for ; Mon, 15 Oct 2012 11:52:10 -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=IBDkDOZoF60qk/Si5pzWw8XjnYY/StI4C+Br6DQO2Ng=; b=oORxIx/ZCPtLFLNX3HvIeFNb9zl17Pk5hME9guL9mSS2g/Yumx/yrUPTeno8wkzs7c bSOHarnpHjUo0KNnDr2Fh6bDBCBl9OvCKwBexGP8HGV+7WrvP8hf3uE6JOF/7YVOxLzI A+69qAg9WtqEiLV8U8g8hrG64KyG8zGWhdR4LFVb3HIrGwWFINUCMGg5+pKF1DB2C5+h mxddUSnRakds/vlWJGux6FPioxCh1fyV+aBJBLsvZ7L9dmuDDL9BEhm893pu0ZS3mpr0 6c/cK25DhKyfaggGpH4KjGxEae/YahQuwLiy2b/L6evcB7+BYSLjr33tCYe3sftzDGHo /xXA== Received: by 10.236.117.97 with SMTP id i61mr11587191yhh.73.1350327130476; Mon, 15 Oct 2012 11:52:10 -0700 (PDT) Received: from vicky.domain.invalid ([177.16.37.219]) by mx.google.com with ESMTPS id u67sm15879079yhb.8.2012.10.15.11.52.08 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Oct 2012 11:52:09 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Mon, 15 Oct 2012 15:51:32 -0300 Message-Id: <1350327102-4463-5-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350327102-4463-1-git-send-email-przanoni@gmail.com> References: <1350327102-4463-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 04/14] 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 Reviewed-by: Jani Nikula --- 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 5071370..4f03b1b 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -1105,14 +1105,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); }