From patchwork Tue Oct 2 20:51:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1538911 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 509E53FDAE for ; Tue, 2 Oct 2012 21:03:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 594C89F311 for ; Tue, 2 Oct 2012 14:03:48 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-gg0-f177.google.com (mail-gg0-f177.google.com [209.85.161.177]) by gabe.freedesktop.org (Postfix) with ESMTP id B7E9E9E9AD for ; Tue, 2 Oct 2012 13:53:32 -0700 (PDT) Received: by mail-gg0-f177.google.com with SMTP id m2so1762342ggn.36 for ; Tue, 02 Oct 2012 13:53:32 -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=aesYRkj8FYcffSSLwcEiOdPUr+dSOauKPQ25uyDQtmk=; b=eU8svHHj6RtZJU4qlB/81dcByTN5JmqZnzq4hS4ZPRv0loDL4+V1jst564eE67W9rE KZa9yNUTySx5Hh0v25VApDmVaGfMJbhHVGtldw6rKYqqwc56FPSSaQ7tdlbocOZYh+Kz gUOldKWtY2i3c6BPc6C262gs/Ww4Rq0xMigezV14QG41av/g+7DJkRxcmNZn3tNbMFQp mPC8K0VFlaHRLc5287SpUdWncbmf0q3HNoyVDIUOYwHY8cZcgSGwYGDUATTNZHU9p9eV jO/yuKUzOFGP5KNY0r2yQXB4l9np6sIfqCJxnpt64tdRBkJ3UDX+L21vTH6ggemUq+kA 0fjw== Received: by 10.236.76.42 with SMTP id a30mr20225060yhe.50.1349211212138; Tue, 02 Oct 2012 13:53:32 -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.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 13:53:31 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 2 Oct 2012 17:51:56 -0300 Message-Id: <1349211142-4802-22-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 21/47] drm/i915: add DP support to intel_ddi_get_hw_state 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 60e089c..57dd975 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -1012,11 +1012,11 @@ bool intel_ddi_get_hw_state(struct intel_encoder *encoder, { struct drm_device *dev = encoder->base.dev; struct drm_i915_private *dev_priv = dev->dev_private; - struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base); + enum port port = intel_ddi_get_encoder_port(encoder); u32 tmp; int i; - tmp = I915_READ(DDI_BUF_CTL(intel_hdmi->ddi_port)); + tmp = I915_READ(DDI_BUF_CTL(port)); if (!(tmp & DDI_BUF_CTL_ENABLE)) return false; @@ -1025,13 +1025,13 @@ bool intel_ddi_get_hw_state(struct intel_encoder *encoder, tmp = I915_READ(DDI_FUNC_CTL(i)); if ((tmp & PIPE_DDI_PORT_MASK) - == PIPE_DDI_SELECT_PORT(intel_hdmi->ddi_port)) { + == PIPE_DDI_SELECT_PORT(port)) { *pipe = i; return true; } } - DRM_DEBUG_KMS("No pipe for ddi port %i found\n", intel_hdmi->ddi_port); + DRM_DEBUG_KMS("No pipe for ddi port %i found\n", port); return true; }