Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7731258 authored by Mohammad Salman's avatar Mohammad Salman
Browse files

drm/msm/sde: fix cx ipeak client availability check



Fix cx ipeak client availability check.
Return proper error values if cx ipeak vote is not supported.

Change-Id: Ia5cb186e40daa4e77f11b39c5df23669225dd017
Signed-off-by: default avatarMohammad Salman <mosalman@codeaurora.org>
parent ee5b52fb
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -1084,15 +1084,15 @@ int sde_cx_ipeak_vote(struct sde_power_handle *phandle, struct dss_clk *clock,
	int ret = 0;
	int ret = 0;
	u64 curr_core_clk_rate, max_core_clk_rate, prev_core_clk_rate;
	u64 curr_core_clk_rate, max_core_clk_rate, prev_core_clk_rate;


	if (phandle->dss_cx_ipeak) {
	if (!phandle->dss_cx_ipeak) {
		pr_debug("%pS->%s: Invalid input\n",
		pr_debug("%pS->%s: Invalid input\n",
				__builtin_return_address(0), __func__);
				__builtin_return_address(0), __func__);
		return -EINVAL;
		return -EOPNOTSUPP;
	}
	}


	if (strcmp("core_clk", clock->clk_name)) {
	if (strcmp("core_clk", clock->clk_name)) {
		pr_debug("Not a core clk , cx_ipeak vote not needed\n");
		pr_debug("Not a core clk , cx_ipeak vote not needed\n");
		return -EINVAL;
		return -EOPNOTSUPP;
	}
	}


	curr_core_clk_rate = clock->rate;
	curr_core_clk_rate = clock->rate;