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

Commit 913cdcea authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa4: Add IPA clock-gated case in IPA PM"

parents 460bde7f d0171c32
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3791,6 +3791,9 @@ void ipa3_disable_clks(void)

	ipa3_ctx->ctrl->ipa3_disable_clks();

	if (ipa3_ctx->use_ipa_pm)
		ipa_pm_set_clock_index(0);

	if (msm_bus_scale_client_update_request(ipa3_ctx->ipa_bus_hdl, 0))
		WARN(1, "bus scaling failed");
	atomic_set(&ipa3_ctx->ipa_clk_vote, 0);
+14 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -352,6 +352,11 @@ static int do_clk_scaling(void)
	int new_th_idx = 1;
	struct clk_scaling_db *clk_scaling;

	if (atomic_read(&ipa3_ctx->ipa_clk_vote) == 0) {
		IPA_PM_DBG("IPA clock is gated\n");
		return 0;
	}

	clk_scaling = &ipa_pm_ctx->clk_scaling;

	mutex_lock(&ipa_pm_ctx->client_mutex);
@@ -1276,6 +1281,14 @@ int ipa_pm_set_throughput(u32 hdl, int throughput)
	return 0;
}

void ipa_pm_set_clock_index(int index)
{
	if (ipa_pm_ctx && index >= 0)
		ipa_pm_ctx->clk_scaling.cur_vote = index;

	IPA_PM_DBG("Setting pm clock vote to %d\n", index);
}

/**
 * ipa_pm_stat() - print PM stat
 * @buf: [in] The user buff used to print
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -107,6 +107,7 @@ int ipa_pm_handle_suspend(u32 pipe_bitmask);
int ipa_pm_deactivate_all_deferred(void);
int ipa_pm_stat(char *buf, int size);
int ipa_pm_exceptions_stat(char *buf, int size);
void ipa_pm_set_clock_index(int index);

#else