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

Commit 94386db8 authored by Praveen Kurapati's avatar Praveen Kurapati
Browse files

msm: ipa3: Add proper checks for low lat pipe and 32-bit specific



For some targets lowlat support is not present.
Add changes to check if low lat support is present
or not. Also for 32-bit targets observed count shift error.
Added proper checks to overcome the issue.

Change-Id: Iab3b7d460b48ce8ff4e98da297eb2e7b69e3db13
Signed-off-by: default avatarPraveen Kurapati <pkurapat@codeaurora.org>
parent 68c091ef
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -681,8 +681,9 @@ static ssize_t gsi_read_gsi_hw_profiling_stats(struct file *file,
		totalCycles = stats.mcs_busy_cnt + stats.mcs_idle_cnt +
			stats.bp_and_pending_cnt;
		if (totalCycles != 0)
			util = (100 * (stats.mcs_busy_cnt + stats.bp_and_pending_cnt)) /
			totalCycles;
			util = div_u64(
				100 * (stats.mcs_busy_cnt + stats.bp_and_pending_cnt),
				totalCycles);
		else
			util = 0;

+8 −5
Original line number Diff line number Diff line
@@ -7629,13 +7629,16 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
			goto fail_wwan_init;
		}

		if (ipa3_ctx->rmnet_ctl_enable) {
			result = ipa3_rmnet_ctl_init();
			if (result) {
			IPAERR(":ipa3_rmnet_ctl_init err=%d\n", -result);
				IPAERR(":ipa3_rmnet_ctl_init err=%d\n",
					-result);
				result = -ENODEV;
				goto fail_rmnet_ctl_init;
			}
		}
	}
	mutex_init(&ipa3_ctx->app_clock_vote.mutex);

	return 0;
+1 −1
Original line number Diff line number Diff line
@@ -484,7 +484,7 @@ static int ipa3_wdi_gsi_db(phys_addr_t* db_addr, struct ipa3_ep_context *ep_ctx)
	/* write channel scratch */
	memset(&gsi_ch_scratch, 0, sizeof(gsi_ch_scratch));
	gsi_ch_scratch.wdi3.db_addr_wp_lsb = (u32)mem.phys_base;
	gsi_ch_scratch.wdi3.db_addr_wp_msb = (u32)(mem.phys_base >> 32);
	gsi_ch_scratch.wdi3.db_addr_wp_msb = (u32)((mem.phys_base & 0xFFFFFFFF00000000) >> 32);
	IPADBG("gsi written lsb value  0x%x\n", gsi_ch_scratch.wdi3.db_addr_wp_lsb);
	IPADBG("gsi written msb value  0x%x\n", gsi_ch_scratch.wdi3.db_addr_wp_msb);

+5 −3
Original line number Diff line number Diff line
@@ -2755,9 +2755,11 @@ static int ipa3_wwan_remove(struct platform_device *pdev)

	IPAWANINFO("rmnet_ipa started deinitialization\n");
	mutex_lock(&rmnet_ipa3_ctx->pipe_handle_guard);
	if (ipa3_ctx->rmnet_ctl_enable) {
		ret = ipa3_teardown_apps_low_lat_pipes();
		if (ret < 0)
			IPAWANERR("Failed to teardown IPA->APPS qmap pipe\n");
	}
	ret = ipa3_teardown_sys_pipe(rmnet_ipa3_ctx->ipa3_to_apps_hdl);
	if (ret < 0)
		IPAWANERR("Failed to teardown IPA->APPS pipe\n");