diff --git a/msm/sde_power_handle.c b/msm/sde_power_handle.c index b8db0e2a9a..6aff807605 100644 --- a/msm/sde_power_handle.c +++ b/msm/sde_power_handle.c @@ -517,12 +517,6 @@ int sde_power_resource_init(struct platform_device *pdev, } } - if (of_find_property(pdev->dev.of_node, "qcom,dss-cx-ipeak", NULL)) - phandle->dss_cx_ipeak = cx_ipeak_register(pdev->dev.of_node, - "qcom,dss-cx-ipeak"); - else - pr_debug("cx ipeak client parse failed\n"); - INIT_LIST_HEAD(&phandle->event_list); phandle->rsc_client = NULL; @@ -576,9 +570,6 @@ void sde_power_resource_deinit(struct platform_device *pdev, } mutex_unlock(&phandle->phandle_lock); - if (phandle->dss_cx_ipeak) - cx_ipeak_unregister(phandle->dss_cx_ipeak); - for (i = 0; i < SDE_POWER_HANDLE_DBUS_ID_MAX; i++) sde_power_data_bus_unregister(&phandle->data_bus_handle[i]); @@ -757,47 +748,11 @@ vreg_err: return rc; } -int sde_cx_ipeak_vote(struct sde_power_handle *phandle, struct dss_clk *clock, - u64 requested_clk_rate, u64 prev_clk_rate, bool enable_vote) -{ - int ret = 0; - u64 curr_core_clk_rate, max_core_clk_rate, prev_core_clk_rate; - - if (!phandle->dss_cx_ipeak) { - pr_debug("%pS->%s: Invalid input\n", - __builtin_return_address(0), __func__); - return -EOPNOTSUPP; - } - - if (strcmp("core_clk", clock->clk_name)) { - pr_debug("Not a core clk , cx_ipeak vote not needed\n"); - return -EOPNOTSUPP; - } - - curr_core_clk_rate = clock->rate; - max_core_clk_rate = clock->max_rate; - prev_core_clk_rate = prev_clk_rate; - - if (enable_vote && requested_clk_rate == max_core_clk_rate && - curr_core_clk_rate != requested_clk_rate) - ret = cx_ipeak_update(phandle->dss_cx_ipeak, true); - else if (!enable_vote && requested_clk_rate != max_core_clk_rate && - prev_core_clk_rate == max_core_clk_rate) - ret = cx_ipeak_update(phandle->dss_cx_ipeak, false); - - if (ret) - SDE_EVT32(ret, enable_vote, requested_clk_rate, - curr_core_clk_rate, prev_core_clk_rate); - - return ret; -} - int sde_power_clk_set_rate(struct sde_power_handle *phandle, char *clock_name, u64 rate) { int i, rc = -EINVAL; struct dss_module_power *mp; - u64 prev_clk_rate, requested_clk_rate; if (!phandle) { pr_err("invalid input power handle\n"); @@ -811,15 +766,8 @@ int sde_power_clk_set_rate(struct sde_power_handle *phandle, char *clock_name, (rate > mp->clk_config[i].max_rate)) rate = mp->clk_config[i].max_rate; - prev_clk_rate = mp->clk_config[i].rate; - requested_clk_rate = rate; - sde_cx_ipeak_vote(phandle, &mp->clk_config[i], - requested_clk_rate, prev_clk_rate, true); mp->clk_config[i].rate = rate; rc = msm_dss_single_clk_set_rate(&mp->clk_config[i]); - if (!rc) - sde_cx_ipeak_vote(phandle, &mp->clk_config[i], - requested_clk_rate, prev_clk_rate, false); break; } } diff --git a/msm/sde_power_handle.h b/msm/sde_power_handle.h index d45189d5dd..a5dbc930a7 100644 --- a/msm/sde_power_handle.h +++ b/msm/sde_power_handle.h @@ -19,7 +19,6 @@ #include #include -#include /* event will be triggered before power handler disable */ #define SDE_POWER_EVENT_PRE_DISABLE 0x1 @@ -144,7 +143,6 @@ struct sde_power_event { * @event_list: current power handle event list * @rsc_client: sde rsc client pointer * @rsc_client_init: boolean to control rsc client create - * @dss_cx_ipeak: client pointer for cx ipeak driver */ struct sde_power_handle { struct dss_module_power mp; @@ -158,7 +156,6 @@ struct sde_power_handle { struct list_head event_list; struct sde_rsc_client *rsc_client; bool rsc_client_init; - struct cx_ipeak_client *dss_cx_ipeak; }; /**