From patchwork Fri May 23 14:51:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 4233211 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 077EF9F1CD for ; Fri, 23 May 2014 14:51:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3C09C2039C for ; Fri, 23 May 2014 14:51:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 28D9D2034B for ; Fri, 23 May 2014 14:51:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CEC316E5B5; Fri, 23 May 2014 07:51:45 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yh0-f42.google.com (mail-yh0-f42.google.com [209.85.213.42]) by gabe.freedesktop.org (Postfix) with ESMTP id 8E9656E5B5 for ; Fri, 23 May 2014 07:51:44 -0700 (PDT) Received: by mail-yh0-f42.google.com with SMTP id t59so4295879yho.15 for ; Fri, 23 May 2014 07:51:44 -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:in-reply-to:references; bh=rXFFCpx5VOpD6k+GlQh0k9fAotgdhTSkCTewsr0RLnw=; b=Tv+hQQyshgIfKfSLcuqg07rj4vkxwMgS/Fy3Exalgya9gq982wV1xXKDUnsQc9sh6t zPh1vBDr75YQYWG0LkSZI1bGfVKxnQsrrX6xMcJvFjD7+GAFUt8Ek1C/PpvDL/zu87gZ iuNxAoa2JOrmfbhncchjhhJRr0vV+rfqiSforGlUavq3+Er0z6b+18FqLB6Jfe6iljWG kAjhmlgy7MdnZMoRGKz+sCInMICP8LEIXEuFeWjWEUHhiKlt3Sxv4NgF/sCJbAUZYL3p 9IZLk7uLcy46/Orzd6wQlRTDdBzEKmdio3NIa7NiavfDqvsHtn3Uxj1J8ppXf5v2pk2a 6izA== X-Received: by 10.236.74.33 with SMTP id w21mr7478337yhd.87.1400856704043; Fri, 23 May 2014 07:51:44 -0700 (PDT) Received: from localhost.localdomain (189.114.236.160.dynamic.adsl.gvt.net.br. [189.114.236.160]) by mx.google.com with ESMTPSA id y3sm4713090yhd.28.2014.05.23.07.51.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 May 2014 07:51:43 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Fri, 23 May 2014 11:51:24 -0300 Message-Id: <1400856685-3158-2-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1400856685-3158-1-git-send-email-przanoni@gmail.com> References: <1400856685-3158-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 1/2] drm/i915: move HSW DDI pll enabling to haswell_crtc_enable X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Paulo Zanoni Now that we moved all the register writing to haswell_crtc_enable, we can also move the PLL enabling there. This is the last step to do before allowing runtime PM on DPMS. Daniel has some patches to do this while also moving all the HSW PLL code to the shared DPLL structs, but while we still discuss the color of those patches, we can apply this quick one and at least get runtime PM on DPMS running in the meantime. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_display.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3da73ef..1ea4fbe 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4052,6 +4052,8 @@ static void haswell_crtc_enable(struct drm_crtc *crtc) if (intel_crtc->active) return; + intel_ddi_pll_enable(intel_crtc); + if (intel_crtc->config.has_dp_encoder) intel_dp_set_m_n(intel_crtc); @@ -4243,6 +4245,8 @@ static void haswell_crtc_disable(struct drm_crtc *crtc) intel_update_fbc(dev); intel_edp_psr_update(dev); mutex_unlock(&dev->struct_mutex); + + intel_ddi_put_crtc_pll(crtc); } static void ironlake_crtc_off(struct drm_crtc *crtc) @@ -4253,7 +4257,6 @@ static void ironlake_crtc_off(struct drm_crtc *crtc) static void haswell_crtc_off(struct drm_crtc *crtc) { - intel_ddi_put_crtc_pll(crtc); } static void i9xx_pfit_enable(struct intel_crtc *crtc) @@ -7471,7 +7474,6 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc, if (!intel_ddi_pll_select(intel_crtc)) return -EINVAL; - intel_ddi_pll_enable(intel_crtc); intel_crtc->lowfreq_avail = false;