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

Commit da6538a1 authored by Michael Adisumarta's avatar Michael Adisumarta Committed by Gerrit - the friendly Code Review server
Browse files

msm: ipa: Add assert for GRAN_SEL config for coal pipe



Assert if coal pipe uses anything other than gran 0 for coal pipe since
IPA 4.5 HW will configure coal pipe with pipe 0 config for gran_sel
which we set to 0 in IPA 4.5 GRAN changes.

Change-Id: Ia8f192279a64a7a20732a41f7defdfa02ea26c53
Signed-off-by: default avatarMichael Adisumarta <madisuma@codeaurora.org>
parent 00b9efe9
Loading
Loading
Loading
Loading
+13 −3
Original line number Original line Diff line number Diff line
@@ -4697,11 +4697,21 @@ int ipa3_cfg_ep_aggr(u32 clnt_hdl, const struct ipa_ep_cfg_aggr *ep_aggr)
			res = -EINVAL;
			res = -EINVAL;
			goto complete;
			goto complete;
		}
		}
		/*
		 * HW bug on IPA4.5 where gran is used from pipe 0 instead of
		 * coal pipe. Add this check to make sure that RSC pipe will use
		 * gran 0 per the requested time needed; pipe 0 will use always
		 * gran 0 as gran 0 is the POR value of it and s/w never change
		 * it.
		 */
		if (ipa3_ctx->ipa_hw_type == IPA_HW_v4_5 &&
		if (ipa3_ctx->ipa_hw_type == IPA_HW_v4_5 &&
		    ipa3_get_client_mapping(clnt_hdl) ==
		    ipa3_get_client_mapping(clnt_hdl) ==
		    IPA_CLIENT_APPS_WAN_COAL_CONS &&
		    IPA_CLIENT_APPS_WAN_COAL_CONS &&
			ipa3_ctx->ep[clnt_hdl].cfg.aggr.pulse_generator != 0)
		    ipa3_ctx->ep[clnt_hdl].cfg.aggr.pulse_generator != 0) {
			IPAERR("coal pipe using GRAN_SEL = %d\n",
			       ipa3_ctx->ep[clnt_hdl].cfg.aggr.pulse_generator);
			ipa_assert();
			ipa_assert();
		}
	} else {
	} else {
		/*
		/*
		 * Global aggregation granularity is 0.5msec.
		 * Global aggregation granularity is 0.5msec.