From patchwork Wed Mar 28 06:18:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rajesh Yadav X-Patchwork-Id: 10312189 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0EFBA60325 for ; Wed, 28 Mar 2018 06:19:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F18FD29ECB for ; Wed, 28 Mar 2018 06:19:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3B8629ED1; Wed, 28 Mar 2018 06:19:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5430A29ECB for ; Wed, 28 Mar 2018 06:19:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751166AbeC1GTP (ORCPT ); Wed, 28 Mar 2018 02:19:15 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58678 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751147AbeC1GTP (ORCPT ); Wed, 28 Mar 2018 02:19:15 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 998F660710; Wed, 28 Mar 2018 06:19:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522217954; bh=fShhj7c7X1Re0+zyAbi5LN2JJd7K2GTrkQLGb/ktrjM=; h=From:To:Cc:Subject:Date:From; b=BVaou5UGMds58pIrqoL9AtQuay/6JqPmXKC5tUXJwFBILuhkNMlWo6XNPkk5zmQMf 3uc5ZxyfBsH1pAB9TeJTqaEMrAUhetpJS9P6McCjds83/UDHJh4CjbCsRRrj2H0tE9 Kyg7Q8dGfqqNqy61QEhP9r5abFduA6x3Orgph6qQ= Received: from ryadav-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ryadav@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 83BF660591; Wed, 28 Mar 2018 06:19:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1522217953; bh=fShhj7c7X1Re0+zyAbi5LN2JJd7K2GTrkQLGb/ktrjM=; h=From:To:Cc:Subject:Date:From; b=khmmFcX6yW/ZXOODWG6aXbqWVN7PhIaLteNyJL6GArq2+nPO1iAPiSHt2sZbXHybl 9r2cwcry9J3Q2edDlJ+7+xnYJRbpPzB77uoI1dtXDIhJUEAy2+BZF6SH4zgofRXjUm 0lkZcOEH9P5Hx4p3QZfMuZRr2EioOqxngEDBAyIE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 83BF660591 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=ryadav@codeaurora.org From: Rajesh Yadav To: dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: Rajesh Yadav , robdclark@gmail.com, seanpaul@chromium.org, hoegsberg@chromium.org Subject: [DPU PATCH 3/3] drm/msm/dsi-staging: Gate bus scale code Date: Wed, 28 Mar 2018 11:48:48 +0530 Message-Id: <1522217928-2262-1-git-send-email-ryadav@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DSI driver relies on downstream bus scaling driver (msm_bus) for bus bandwidth voting. Gate the bus bandwidth voting code under CONFIG_QCOM_BUS_SCALING. Signed-off-by: Rajesh Yadav --- drivers/gpu/drm/msm/dsi-staging/dsi_clk_manager.c | 8 ++++++++ drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c | 7 ++++++- drivers/gpu/drm/msm/dsi-staging/dsi_phy.c | 2 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_clk_manager.c b/drivers/gpu/drm/msm/dsi-staging/dsi_clk_manager.c index 919de1e..047f759 100644 --- a/drivers/gpu/drm/msm/dsi-staging/dsi_clk_manager.c +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_clk_manager.c @@ -17,7 +17,9 @@ #include #include "dsi_clk.h" +#ifdef CONFIG_QCOM_BUS_SCALING #include +#endif struct dsi_core_clks { struct dsi_core_clk_info clks; @@ -226,6 +228,7 @@ int dsi_core_clk_start(struct dsi_core_clks *c_clks) } } +#ifdef CONFIG_QCOM_BUS_SCALING if (c_clks->bus_handle) { rc = msm_bus_scale_client_update_request(c_clks->bus_handle, 1); if (rc) { @@ -233,11 +236,14 @@ int dsi_core_clk_start(struct dsi_core_clks *c_clks) goto error_disable_mmss_clk; } } +#endif return rc; +#ifdef CONFIG_QCOM_BUS_SCALING error_disable_mmss_clk: if (c_clks->clks.core_mmss_clk) clk_disable_unprepare(c_clks->clks.core_mmss_clk); +#endif error_disable_bus_clk: if (c_clks->clks.bus_clk) @@ -259,6 +265,7 @@ int dsi_core_clk_stop(struct dsi_core_clks *c_clks) { int rc = 0; +#ifdef CONFIG_QCOM_BUS_SCALING if (c_clks->bus_handle) { rc = msm_bus_scale_client_update_request(c_clks->bus_handle, 0); if (rc) { @@ -266,6 +273,7 @@ int dsi_core_clk_stop(struct dsi_core_clks *c_clks) return rc; } } +#endif if (c_clks->clks.core_mmss_clk) clk_disable_unprepare(c_clks->clks.core_mmss_clk); diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c b/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c index fae1b565..0ab92bb 100644 --- a/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c @@ -17,7 +17,9 @@ #include #include #include +#ifdef CONFIG_QCOM_BUS_SCALING #include +#endif #include #include