[Freedreno] [DPU PATCH 3/3] drm/msm/dsi-staging: Gate bus scale code

Sean Paul seanpaul at chromium.org
Wed Apr 4 17:15:21 UTC 2018


On Wed, Mar 28, 2018 at 11:48:48AM +0530, Rajesh Yadav wrote:
> 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 <ryadav at codeaurora.org>

Thank you for your patch. Since dsi-staging isn't going upstream, let's hold
off on this.

Sean

> ---
>  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 <linux/slab.h>
>  #include "dsi_clk.h"
>  
> +#ifdef CONFIG_QCOM_BUS_SCALING
>  #include <linux/msm-bus.h>
> +#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 <linux/err.h>
>  #include <linux/regulator/consumer.h>
>  #include <linux/clk.h>
> +#ifdef CONFIG_QCOM_BUS_SCALING
>  #include <linux/msm-bus.h>
> +#endif
>  #include <linux/of_irq.h>
>  #include <video/mipi_display.h>
>  
> @@ -716,6 +718,7 @@ static int dsi_ctrl_axi_bus_client_init(struct platform_device *pdev,
>  					struct dsi_ctrl *ctrl)
>  {
>  	int rc = 0;
> +#ifdef CONFIG_QCOM_BUS_SCALING
>  	struct dsi_ctrl_bus_scale_info *bus = &ctrl->axi_bus_info;
>  
>  	bus->bus_scale_table = msm_bus_cl_get_pdata(pdev);
> @@ -731,12 +734,13 @@ static int dsi_ctrl_axi_bus_client_init(struct platform_device *pdev,
>  		rc = -EINVAL;
>  		pr_err("failed to register axi bus client\n");
>  	}
> -
> +#endif
>  	return rc;
>  }
>  
>  static int dsi_ctrl_axi_bus_client_deinit(struct dsi_ctrl *ctrl)
>  {
> +#ifdef CONFIG_QCOM_BUS_SCALING
>  	struct dsi_ctrl_bus_scale_info *bus = &ctrl->axi_bus_info;
>  
>  	if (bus->bus_handle) {
> @@ -744,6 +748,7 @@ static int dsi_ctrl_axi_bus_client_deinit(struct dsi_ctrl *ctrl)
>  
>  		bus->bus_handle = 0;
>  	}
> +#endif
>  	return 0;
>  }
>  
> diff --git a/drivers/gpu/drm/msm/dsi-staging/dsi_phy.c b/drivers/gpu/drm/msm/dsi-staging/dsi_phy.c
> index c13e5bb..e712c61 100644
> --- a/drivers/gpu/drm/msm/dsi-staging/dsi_phy.c
> +++ b/drivers/gpu/drm/msm/dsi-staging/dsi_phy.c
> @@ -17,7 +17,9 @@
>  #include <linux/err.h>
>  #include <linux/regulator/consumer.h>
>  #include <linux/clk.h>
> +#ifdef CONFIG_QCOM_BUS_SCALING
>  #include <linux/msm-bus.h>
> +#endif
>  #include <linux/list.h>
>  
>  #include "msm_drv.h"
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS


More information about the Freedreno mailing list