From patchwork Thu Oct 18 21:21:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 1613651 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 E07B5E018D for ; Thu, 18 Oct 2012 21:24:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D94AAA0ACE for ; Thu, 18 Oct 2012 14:24:34 -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 F05CB9E815 for ; Thu, 18 Oct 2012 14:22:10 -0700 (PDT) Received: by mail-gg0-f177.google.com with SMTP id h1so2410388gge.36 for ; Thu, 18 Oct 2012 14:22: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=wPfBNfFgttG8zmwElpq7CunDQCO08IMONSm6ddfkgco=; b=gWmCKr5ydd1COtG/vWdtB2ljbuSVuVQbwB058prId1UYSZt6KrXagIVqF8lTQxa4tx 8adYIq3Js+et9uhMxcZILHYz3q/O5pshO4ipX43kIqf4gCPnIcu6Rdr2CtODp7QF+Pq5 6vzI9R5VIgu2U8Uzqmrol8mB7qWbcdUNmsl5r3O5mLR0cpN1q1k52A2xLq6YIKgLV0vc tshVsSTMT70H8w6LnyodNyI5DwznkFn/C98ox6dsTSk1sQrU5HGczOgZ7JfU2W5ZdnOV nvg4vWacrYMkH9t2bak1eyD3Xsm5ic5kjoAebuaP0J3LDKLfSOqSGd4CcTxiQyeB82+M HxCQ== Received: by 10.101.132.26 with SMTP id j26mr6904660ann.85.1350595330433; Thu, 18 Oct 2012 14:22:10 -0700 (PDT) Received: from vicky.domain.invalid ([177.16.81.162]) by mx.google.com with ESMTPS id o13sm22450078ang.1.2012.10.18.14.22.08 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 18 Oct 2012 14:22:09 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 18 Oct 2012 18:21:34 -0300 Message-Id: <1350595304-18237-5-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350595304-18237-1-git-send-email-przanoni@gmail.com> References: <1350595304-18237-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 04/14] drm/i915: check TRANSCODER_EDP on intel_modeset_setup_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 We need to check if any of the pipes is using TRANSCODER_EDP. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_display.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 73ce007..827c5ba 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8551,6 +8551,31 @@ void intel_modeset_setup_hw_state(struct drm_device *dev) struct intel_encoder *encoder; struct intel_connector *connector; + if (IS_HASWELL(dev)) { + tmp = I915_READ(DDI_FUNC_CTL(TRANSCODER_EDP)); + + if (tmp & TRANS_DDI_FUNC_ENABLE) { + switch (tmp & TRANS_DDI_EDP_INPUT_MASK) { + case TRANS_DDI_EDP_INPUT_A_ON: + case TRANS_DDI_EDP_INPUT_A_ONOFF: + pipe = PIPE_A; + break; + case TRANS_DDI_EDP_INPUT_B_ONOFF: + pipe = PIPE_B; + break; + case TRANS_DDI_EDP_INPUT_C_ONOFF: + pipe = PIPE_C; + break; + } + + crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); + crtc->cpu_transcoder = TRANSCODER_EDP; + + DRM_DEBUG_KMS("Pipe %c using transcoder EDP\n", + pipe_name(pipe)); + } + } + for_each_pipe(pipe) { crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);