From: Paulo Zanoni Subject: [RFC 22/30] drm/i915: don't run PCH code on non-PCH ports Date: Tue, 28 Aug 2012 19:06:53 -0300 Message-ID: <1346191621-12996-23-git-send-email-przanoni@gmail.com> References: <1346191621-12996-1-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by gabe.freedesktop.org (Postfix) with ESMTP id DC6F39E9AF for ; Tue, 28 Aug 2012 15:08:04 -0700 (PDT) Received: by mail-yx0-f177.google.com with SMTP id q9so1203648yen.36 for ; Tue, 28 Aug 2012 15:08:04 -0700 (PDT) In-Reply-To: <1346191621-12996-1-git-send-email-przanoni@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org From: Paulo Zanoni This should fix the FDI assertions we're getting on Haswell. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_display.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index c7ba7ad..4aa2c1d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3289,10 +3289,13 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) int pipe = intel_crtc->pipe; int plane = intel_crtc->plane; u32 reg, temp; + bool is_pch_port; if (!intel_crtc->active) return; + is_pch_port = intel_crtc_driving_pch(crtc); + intel_crtc_wait_for_pending_flips(crtc); drm_vblank_off(dev, pipe); intel_crtc_update_cursor(crtc, false); @@ -3310,14 +3313,17 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) ironlake_fdi_disable(crtc); - /* This is a horrible layering violation; we should be doing this in - * the connector/encoder ->prepare instead, but we don't always have - * enough information there about the config to know whether it will - * actually be necessary or just cause undesired flicker. - */ - intel_disable_pch_ports(dev_priv, pipe); + if (is_pch_port) { + /* This is a horrible layering violation; we should be doing + * this in the connector/encoder ->prepare instead, but we don't + * always have enough information there about the config to know + * whether it will actually be necessary or just cause undesired + * flicker. + */ + intel_disable_pch_ports(dev_priv, pipe); - intel_disable_transcoder(dev_priv, pipe); + intel_disable_transcoder(dev_priv, pipe); + } if (HAS_PCH_CPT(dev)) { /* disable TRANS_DP_CTL */ -- 1.7.11.2