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

Commit 5843503f authored by Bojun Pan's avatar Bojun Pan Committed by Gerrit - the friendly Code Review server
Browse files

msm: IPA: enable uC debug stats for gsi on IPA4.1 APQ



Enable uC debug stats for gsi offloading protocols on IPA4.1
APQ platform.

Change-Id: I3de6bb29286a725304f4771f9bc6955281821f85
Signed-off-by: default avatarBojun Pan <bojunp@codeaurora.org>
parent e8d900e1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -272,7 +272,9 @@ static void ipa3_start_gsi_debug_monitor(u32 clnt_hdl)
	client_type = ipa3_get_client_mapping(clnt_hdl);

	/* start uC gsi dbg stats monitor */
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 ||
		(ipa3_ctx->ipa_hw_type == IPA_HW_v4_1 &&
		ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ)) {
		switch (client_type) {
		case IPA_CLIENT_MHI_PRIME_TETH_PROD:
			gsi_info = &ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_MHIP];
+18 −6
Original line number Diff line number Diff line
@@ -1988,7 +1988,9 @@ static ssize_t ipa3_read_wdi_gsi_stats(struct file *file,
	int nbytes;
	int cnt = 0;

	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5
		&& (ipa3_ctx->ipa_hw_type != IPA_HW_v4_1
		|| ipa3_ctx->platform_type != IPA_PLAT_TYPE_APQ)) {
		nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN,
				"This feature only support on IPA4.5+\n");
		cnt += nbytes;
@@ -2036,7 +2038,9 @@ static ssize_t ipa3_read_wdi3_gsi_stats(struct file *file,
	int nbytes;
	int cnt = 0;

	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5
		&& (ipa3_ctx->ipa_hw_type != IPA_HW_v4_1
		|| ipa3_ctx->platform_type != IPA_PLAT_TYPE_APQ)) {
		nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN,
				"This feature only support on IPA4.5+\n");
		cnt += nbytes;
@@ -2083,7 +2087,9 @@ static ssize_t ipa3_read_11ad_gsi_stats(struct file *file,
	int nbytes;
	int cnt = 0;

	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5
		&& (ipa3_ctx->ipa_hw_type != IPA_HW_v4_1
		|| ipa3_ctx->platform_type != IPA_PLAT_TYPE_APQ)) {
		nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN,
				"This feature only support on IPA4.5+\n");
		cnt += nbytes;
@@ -2100,7 +2106,9 @@ static ssize_t ipa3_read_aqc_gsi_stats(struct file *file,
	int nbytes;
	int cnt = 0;

	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5
		&& (ipa3_ctx->ipa_hw_type != IPA_HW_v4_1
		|| ipa3_ctx->platform_type != IPA_PLAT_TYPE_APQ)) {
		nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN,
				"This feature only support on IPA4.5+\n");
		cnt += nbytes;
@@ -2118,7 +2126,9 @@ static ssize_t ipa3_read_mhip_gsi_stats(struct file *file,
	int nbytes;
	int cnt = 0;

	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5
		&& (ipa3_ctx->ipa_hw_type != IPA_HW_v4_1
		|| ipa3_ctx->platform_type != IPA_PLAT_TYPE_APQ)) {
		nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN,
			"This feature only support on IPA4.5+\n");
		cnt += nbytes;
@@ -2190,7 +2200,9 @@ static ssize_t ipa3_read_usb_gsi_stats(struct file *file,
	int nbytes;
	int cnt = 0;

	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_5
		&& (ipa3_ctx->ipa_hw_type != IPA_HW_v4_1
		|| ipa3_ctx->platform_type != IPA_PLAT_TYPE_APQ)) {
		nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN,
			"This feature only support on IPA4.5+\n");
		cnt += nbytes;
+9 −3
Original line number Diff line number Diff line
@@ -2097,7 +2097,9 @@ int ipa3_disconnect_gsi_wdi_pipe(u32 clnt_hdl)
		ipa3_ctx->uc_wdi_ctx.stats_notify = NULL;
	else
		IPADBG("uc_wdi_ctx.stats_notify already null\n");
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5)
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 ||
		(ipa3_ctx->ipa_hw_type == IPA_HW_v4_1 &&
		ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ))
		ipa3_uc_debug_stats_dealloc(IPA_HW_PROTOCOL_WDI);
	IPADBG("client (ep: %d) disconnected\n", clnt_hdl);

@@ -2478,7 +2480,9 @@ int ipa3_resume_gsi_wdi_pipe(u32 clnt_hdl)
	}
	pcmd_t = &ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_WDI];
	/* start uC gsi dbg stats monitor */
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 ||
		(ipa3_ctx->ipa_hw_type == IPA_HW_v4_1 &&
		ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ)) {
		if (IPA_CLIENT_IS_PROD(ep->client)) {
			pcmd_t->ch_id_info[0].ch_id
				= ep->gsi_chan_hdl;
@@ -2654,7 +2658,9 @@ int ipa3_suspend_gsi_wdi_pipe(u32 clnt_hdl)
	}
	pcmd_t = &ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_WDI];
	/* stop uC gsi dbg stats monitor */
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 ||
		(ipa3_ctx->ipa_hw_type == IPA_HW_v4_1 &&
		ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ)) {
		if (IPA_CLIENT_IS_PROD(ep->client)) {
			pcmd_t->ch_id_info[0].ch_id
				= 0xff;
+3 −1
Original line number Diff line number Diff line
@@ -7153,7 +7153,9 @@ static int __ipa3_stop_gsi_channel(u32 clnt_hdl)
	memset(&mem, 0, sizeof(mem));

	/* stop uC gsi dbg stats monitor */
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 ||
		(ipa3_ctx->ipa_hw_type == IPA_HW_v4_1 &&
		ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ)) {
		switch (client_type) {
		case IPA_CLIENT_MHI_PRIME_TETH_PROD:
			gsi_info = &ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_MHIP];
+9 −3
Original line number Diff line number Diff line
@@ -698,7 +698,9 @@ int ipa3_disconn_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx)
		goto exit;
	}

	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5)
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 ||
		(ipa3_ctx->ipa_hw_type == IPA_HW_v4_1 &&
		ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ))
		ipa3_uc_debug_stats_dealloc(IPA_HW_PROTOCOL_WDI3);
	ipa3_delete_dflt_flt_rules(ipa_ep_idx_rx);
	memset(ep_rx, 0, sizeof(struct ipa3_ep_context));
@@ -745,7 +747,9 @@ int ipa3_enable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx)
		goto exit;
	}
	/* start uC gsi dbg stats monitor */
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 ||
		(ipa3_ctx->ipa_hw_type == IPA_HW_v4_1 &&
		ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ)) {
		ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_WDI3].ch_id_info[0].ch_id
			= ep_rx->gsi_chan_hdl;
		ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_WDI3].ch_id_info[0].dir
@@ -852,7 +856,9 @@ int ipa3_disable_wdi3_pipes(int ipa_ep_idx_tx, int ipa_ep_idx_rx)
		goto fail;
	}
	/* stop uC gsi dbg stats monitor */
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5) {
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 ||
		(ipa3_ctx->ipa_hw_type == IPA_HW_v4_1 &&
		ipa3_ctx->platform_type == IPA_PLAT_TYPE_APQ)) {
		ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_WDI3].ch_id_info[0].ch_id
			= 0xff;
		ipa3_ctx->gsi_info[IPA_HW_PROTOCOL_WDI3].ch_id_info[0].dir