Skip to contentSkip to conversation

drm/msm/dsi-staging: Gate bus scale code

PATCH In review Rajesh Yadav 2 participants 2 messages Mar 28, 2018 – Apr 4, 2018 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 drm/msm/dsi-staging: Gate bus scale code

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.

---
 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(-)
drivers/gpu/drm/msm/dsi-staging/dsi_clk_manager.c +8 -0
index 919de1e..047f759 100644
@@ -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);
drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c +6 -1
index fae1b565..0ab92bb 100644
@@ -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;
 }
 
drivers/gpu/drm/msm/dsi-staging/dsi_phy.c +2 -0
index c13e5bb..e712c61 100644
@@ -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"
Signature · 7 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno

A message that is not in the archive (sent off-list or not yet received): 1522217928-2262-1-git-send-email-ryadav-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org

#2 lore raw
Quoted 6 lines · Rajesh Yadav

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.

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

Sean

Quoted 122 lines
---
 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(-)
drivers/gpu/drm/msm/dsi-staging/dsi_clk_manager.c +8 -0
index 919de1e..047f759 100644
@@ -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);
drivers/gpu/drm/msm/dsi-staging/dsi_ctrl.c +6 -1
index fae1b565..0ab92bb 100644
@@ -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;
 }
 
drivers/gpu/drm/msm/dsi-staging/dsi_phy.c +2 -0
index c13e5bb..e712c61 100644
@@ -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"
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
Freedreno mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/freedreno