From patchwork Mon Oct 15 18:51:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1595181 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 720C1DFB34 for ; Mon, 15 Oct 2012 18:57:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 673389F74D for ; Mon, 15 Oct 2012 11:57:36 -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 B67A79F693 for ; Mon, 15 Oct 2012 11:52:27 -0700 (PDT) Received: by mail-yh0-f49.google.com with SMTP id j52so1335408yhj.36 for ; Mon, 15 Oct 2012 11:52:27 -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=wLPrEIB+jm7IT2C/WDsvDL20x9U88Fttttvra9qPPmw=; b=Feh5FcCuuEK/WHH0iIJPdWvq47IKGD2NqcL1PnPUHDYlM7mJ4RC0WVp5MFunGWlWCD HUFAE48B555cOl90yxe9oOOGgN9K6FkxQzglJGHU7QgG7Iaz5TGdS92jtwjDVQXMbjOK zCp0zWId3OyDEe6HquoUVWtZrcPIeOHiv5oZS9T1/1CeUCBzf8zZ+6VLNo5pD9R0uJGj DiQStDgqDaQND2fDH0tUpguOJxtu06D0dhTh9tPTkfIfop73DMHilu+9NJtQ9oUsfxFu Saq3QmC/C73+J3AED7NfibPTffp5xAAAc+pN6Eo63bO3SWx2NXXKPjIVcittjdtJ+w2E slQg== Received: by 10.236.147.208 with SMTP id t56mr11268350yhj.88.1350327147405; Mon, 15 Oct 2012 11:52:27 -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.25 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Oct 2012 11:52:26 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Mon, 15 Oct 2012 15:51:39 -0300 Message-Id: <1350327102-4463-12-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 11/14] 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 Reviewed-by: Damien Lespiau --- 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 817ebb2..9324636 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -1014,11 +1014,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; @@ -1027,13 +1027,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; }