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

Commit 5d18437d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa4: IPA PM Unit tests init fix"

parents 703e7b47 9cb4d213
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -3947,16 +3947,18 @@ int ipa3_set_clock_plan_from_pm(int idx)
{
	u32 clk_rate;

	if (!ipa3_ctx->enable_clock_scaling)
	IPADBG_LOW("idx = %d\n", idx);

	if (!ipa3_ctx->enable_clock_scaling) {
		ipa3_ctx->ipa3_active_clients.bus_vote_idx = idx;
		return 0;
	}

	if (ipa3_ctx->ipa3_hw_mode != IPA_HW_MODE_NORMAL) {
		IPAERR("not supported in this mode\n");
		return 0;
	}

	IPADBG_LOW("idx = %d\n", idx);

	if (idx <= 0 || idx >= ipa3_ctx->ctrl->msm_bus_data_ptr->num_usecases) {
		IPAERR("bad voltage\n");
		return -EINVAL;
+27 −13
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, 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
@@ -23,18 +23,32 @@ struct callback_param {

static int ipa_pm_ut_setup(void **ppriv)
{
	int i;

	IPA_UT_DBG("Start Setup\n");

	/* decrement UT vote */
	IPA_ACTIVE_CLIENTS_DEC_SPECIAL("IPA_UT");

	/*decouple PM from RPM */
	ipa3_ctx->enable_clock_scaling = false;

	if (ipa3_ctx->use_ipa_pm) {
		for (i = 0; i < IPA_PM_MAX_CLIENTS; i++) {
			ipa_pm_deactivate_sync(i);
			ipa_pm_deregister(i);
		}

		ipa_pm_destroy();
	}

	return 0;
}

static int ipa_pm_ut_teardown(void *priv)
{
	IPA_UT_DBG("Start Teardown\n");
	IPA_UT_ERR("WARNING: IPA_PM HAS BEEN DESTROYED, REBOOT TO RE_INIT\n");

	/* undo UT vote */
	IPA_ACTIVE_CLIENTS_INC_SPECIAL("IPA_UT");
@@ -106,7 +120,7 @@ static int ipa_pm_ut_single_registration(void *priv)
	struct callback_param user_data;

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -223,7 +237,7 @@ static int ipa_pm_ut_double_register_activate(void *priv)
	struct callback_param user_data;

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -327,7 +341,7 @@ static int ipa_pm_ut_deferred_deactivate(void *priv)
	struct callback_param user_data;

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -436,7 +450,7 @@ static int ipa_pm_ut_two_clients_activate(void *priv)


	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -648,7 +662,7 @@ static int ipa_pm_ut_deactivate_all_deferred(void *priv)
	struct callback_param user_data;

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -797,7 +811,7 @@ static int ipa_pm_ut_deactivate_after_activate(void *priv)
	struct callback_param user_data;

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -885,7 +899,7 @@ static int ipa_pm_ut_atomic_activate(void *priv)
	unsigned long flags;

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -957,7 +971,7 @@ static int ipa_pm_ut_deactivate_loop(void *priv)
	int i, hdl_USB, hdl_WLAN, vote;

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -1095,7 +1109,7 @@ static int ipa_pm_ut_set_perf_profile(void *priv)
	int hdl_USB, hdl_WLAN, vote, idx;

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -1210,7 +1224,7 @@ static int ipa_pm_ut_group_tput(void *priv)
	int hdl_USB, hdl_WLAN, hdl_MODEM, vote, idx;

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -1377,7 +1391,7 @@ static int ipa_pm_ut_skip_clk_vote_tput(void *priv)
	int hdl_USB, hdl_WLAN, hdl_MODEM, vote, idx;

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000}
	};

@@ -1542,7 +1556,7 @@ static int ipa_pm_ut_simple_exception(void *priv)
	};

	struct ipa_pm_init_params init_params = {
		.threshold_size = IPA_PM_THRESHOLD_MAX,
		.threshold_size = 2,
		.default_threshold = {600, 1000},
		.exception_size = 1,
		.exceptions[0] = exceptions,