From patchwork Tue Aug 28 22:06: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: 1382861 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 9AC22DF283 for ; Tue, 28 Aug 2012 22:20:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E5BF9E976 for ; Tue, 28 Aug 2012 15:20:54 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 24A259E877 for ; Tue, 28 Aug 2012 15:07:56 -0700 (PDT) Received: by mail-yx0-f177.google.com with SMTP id q9so1203648yen.36 for ; Tue, 28 Aug 2012 15:07:56 -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=FAM3XgdiVND3f2LxtlflUsq3mJHmpgq5nbX7DQkHBBA=; b=wDNhvC/inmC5JYi0v55vB08pVZ+KGStC+INhTgXbngCU8SGqWRg1EOCSxk45lDpP+v 7E4GZhoW7VFoAPC5IiffQD09RQBqhLR1bYLP/ObZKdmYo9VJv94gsr8tYdOy9JbCi3Nb OR+d1QuMfwz3A3Pryz8sgK9/O7c5enT+w6jstaA3z2Rwe7a2Fl29Rbesxb5hC0+fFTI3 m6U1JtbusSRda93LhCcltnArCmBkrpbE8tAXoZF6O1uXKpPRsZIXJ1UFMqBA5Ap5k6By /03nEEFxsoZETskE1UUVm5e4NRFBbfQeAk5RAOkaD1rWYZrre73yJdhZVUpJEZFtT6l9 MtIw== Received: by 10.236.135.147 with SMTP id u19mr15287840yhi.115.1346191676070; Tue, 28 Aug 2012 15:07:56 -0700 (PDT) Received: from vicky.domain.invalid (189.114.178.236.dynamic.adsl.gvt.net.br. [189.114.178.236]) by mx.google.com with ESMTPS id z3sm4434172anj.20.2012.08.28.15.07.53 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 28 Aug 2012 15:07:55 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 28 Aug 2012 19:06:49 -0300 Message-Id: <1346191621-12996-19-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1346191621-12996-1-git-send-email-przanoni@gmail.com> References: <1346191621-12996-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [RFC 18/30] drm/i915: add DP support to intel_ddi_disable 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 Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index ed38bb3..c2377b0 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -1054,8 +1054,16 @@ void intel_ddi_disable(struct drm_encoder *encoder) { struct drm_i915_private *dev_priv = encoder->dev->dev_private; struct drm_crtc *crtc = encoder->crtc; - struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder); - int port = intel_hdmi->ddi_port; + struct intel_encoder *intel_encoder = to_intel_encoder(encoder); + int port; + + if (intel_encoder->type == INTEL_OUTPUT_HDMI) { + struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder); + port = intel_hdmi->ddi_port; + } else { + struct intel_dp *intel_dp = enc_to_intel_dp(encoder); + port = intel_dp->port; + } if (intel_ddi_port_disabled(dev_priv, port)) return;