From patchwork Tue Sep 15 10:35:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: durgadoss.r@intel.com X-Patchwork-Id: 7183461 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 018DDBEEC1 for ; Tue, 15 Sep 2015 10:09:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 112AE2060D for ; Tue, 15 Sep 2015 10:09:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id ED9C520602 for ; Tue, 15 Sep 2015 10:08:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6572E6E452; Tue, 15 Sep 2015 03:08:59 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 70C966E4A3 for ; Tue, 15 Sep 2015 03:08:57 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 15 Sep 2015 03:08:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,535,1437462000"; d="scan'208";a="562006890" Received: from dr3-desktop.iind.intel.com ([10.223.26.125]) by FMSMGA003.fm.intel.com with ESMTP; 15 Sep 2015 03:08:55 -0700 From: Durgadoss R To: intel-gfx@lists.freedesktop.org Date: Tue, 15 Sep 2015 16:05:00 +0530 Message-Id: <1442313301-7053-2-git-send-email-durgadoss.r@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1442313301-7053-1-git-send-email-durgadoss.r@intel.com> References: <1442313301-7053-1-git-send-email-durgadoss.r@intel.com> Subject: [Intel-gfx] [PATCH 1/2] drm/i915/dp: Make bxt_ddi_pll_select non-static X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, 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 Make bxt_ddi_pll_select non-static so that it can be called from other files also. The subsequent patches need this from display.c. The call to 'intel_get_shared_pll' is not required if there is already a valid PLL. This patch adds a boolean argument to by-pass this case. Signed-off-by: Durgadoss R --- drivers/gpu/drm/i915/intel_ddi.c | 11 +++++++---- drivers/gpu/drm/i915/intel_drv.h | 4 ++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 4823184..5326d60 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -1612,10 +1612,9 @@ static const struct bxt_clk_div bxt_dp_clk_val[] = { {432000, 3, 1, 32, 1677722, 1, 1} }; -static bool -bxt_ddi_pll_select(struct intel_crtc *intel_crtc, +bool bxt_ddi_pll_select(struct intel_crtc *intel_crtc, struct intel_crtc_state *crtc_state, - struct intel_encoder *intel_encoder) + struct intel_encoder *intel_encoder, bool find_pll) { struct intel_shared_dpll *pll; struct bxt_clk_div clk_div = {0}; @@ -1724,6 +1723,9 @@ bxt_ddi_pll_select(struct intel_crtc *intel_crtc, crtc_state->dpll_hw_state.pcsdw12 = LANESTAGGER_STRAP_OVRD | lanestagger; + if (!find_pll) + goto exit; + pll = intel_get_shared_dpll(intel_crtc, crtc_state); if (pll == NULL) { DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n", @@ -1734,6 +1736,7 @@ bxt_ddi_pll_select(struct intel_crtc *intel_crtc, /* shared DPLL id 0 is DPLL A */ crtc_state->ddi_pll_sel = pll->id; +exit: return true; } @@ -1756,7 +1759,7 @@ bool intel_ddi_pll_select(struct intel_crtc *intel_crtc, intel_encoder); else if (IS_BROXTON(dev)) return bxt_ddi_pll_select(intel_crtc, crtc_state, - intel_encoder); + intel_encoder, true); else return hsw_ddi_pll_select(intel_crtc, crtc_state, intel_encoder); diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 46484e4..30f91cf 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -1130,6 +1130,10 @@ void broxton_init_cdclk(struct drm_device *dev); void broxton_uninit_cdclk(struct drm_device *dev); void broxton_ddi_phy_init(struct drm_device *dev); void broxton_ddi_phy_uninit(struct drm_device *dev); +bool bxt_ddi_pll_select(struct intel_crtc *intel_crtc, + struct intel_crtc_state *crtc_state, + struct intel_encoder *intel_encoder, + bool find_pll); void bxt_enable_dc9(struct drm_i915_private *dev_priv); void bxt_disable_dc9(struct drm_i915_private *dev_priv); void skl_init_cdclk(struct drm_i915_private *dev_priv);