From patchwork Thu Nov 5 22:33:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Navare, Manasi" X-Patchwork-Id: 11885379 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92495C388F7 for ; Thu, 5 Nov 2020 22:32:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 44F6E20719 for ; Thu, 5 Nov 2020 22:32:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44F6E20719 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8AE3E6E840; Thu, 5 Nov 2020 22:32:02 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id C51A96E116 for ; Thu, 5 Nov 2020 22:31:57 +0000 (UTC) IronPort-SDR: G2oZONBsUdR4aFCqbmuCJW8ygjPUZn+rnnWc3BIJHATmt7RRw+s3PhiurL0XLL20xxa+j2JICa t4ec70UFCDlw== X-IronPort-AV: E=McAfee;i="6000,8403,9796"; a="233637446" X-IronPort-AV: E=Sophos;i="5.77,454,1596524400"; d="scan'208";a="233637446" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Nov 2020 14:31:56 -0800 IronPort-SDR: FnDCjYVZjQJ/zBME41e5pZeiwSwowTcGwldLqIkdSc+fo6Key7iuHi809WkRve/nde1kml6xZ6 r+6mNA5YEE1w== X-IronPort-AV: E=Sophos;i="5.77,454,1596524400"; d="scan'208";a="321379374" Received: from labuser-z97x-ud5h.jf.intel.com ([10.165.21.211]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 05 Nov 2020 14:31:56 -0800 From: Manasi Navare To: intel-gfx@lists.freedesktop.org Date: Thu, 5 Nov 2020 14:33:55 -0800 Message-Id: <20201105223359.28203-4-manasi.d.navare@intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20201105223359.28203-1-manasi.d.navare@intel.com> References: <20201105223359.28203-1-manasi.d.navare@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v7 3/7] drm/i915/dp: Add a wrapper function around get_pipe_config X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Create a new function intel_crtc_get_pipe_config() that calls platform specific hooks for get_pipe_config() No functional change here. Suggested-by: Ville Syrjälä Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 64fb02cc5ff1..7fba583adf90 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -11479,6 +11479,14 @@ static bool hsw_get_pipe_config(struct intel_crtc *crtc, return active; } +static bool intel_crtc_get_pipe_config(struct intel_crtc *crtc, + struct intel_crtc_state *pipe_config) +{ + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); + + return dev_priv->display.get_pipe_config(crtc, pipe_config); +} + static u32 intel_cursor_base(const struct intel_plane_state *plane_state) { struct drm_i915_private *dev_priv = @@ -12475,7 +12483,7 @@ intel_encoder_current_mode(struct intel_encoder *encoder) return NULL; } - if (!dev_priv->display.get_pipe_config(crtc, crtc_state)) { + if (!intel_crtc_get_pipe_config(crtc, crtc_state)) { kfree(crtc_state); kfree(mode); return NULL; @@ -14495,7 +14503,7 @@ verify_crtc_state(struct intel_crtc *crtc, pipe_config->hw.enable = new_crtc_state->hw.enable; pipe_config->hw.active = - dev_priv->display.get_pipe_config(crtc, pipe_config); + intel_crtc_get_pipe_config(crtc, pipe_config); /* we keep both pipes enabled on 830 */ if (IS_I830(dev_priv) && pipe_config->hw.active) @@ -18808,7 +18816,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) intel_crtc_state_reset(crtc_state, crtc); crtc_state->hw.active = crtc_state->hw.enable = - dev_priv->display.get_pipe_config(crtc, crtc_state); + intel_crtc_get_pipe_config(crtc, crtc_state); crtc->base.enabled = crtc_state->hw.enable; crtc->active = crtc_state->hw.active;