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

Commit e1ad84d0 authored by Michael Adisumarta's avatar Michael Adisumarta
Browse files

msm: ipa4: Disable prefetch for IPA 4.0



Disable smart prefetch for IPA 4.0 and beyond as
this is implemented in HW.

Change-Id: Id449d9088875027c6197046b6e1e1c3f76fc5de7
CRs-fixed: 2173434
Signed-off-by: default avatarMichael Adisumarta <madisuma@codeaurora.org>
parent 33ba9737
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-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
@@ -1326,6 +1326,10 @@ static int ipa3_usb_request_xdci_channel(
	chan_params.chan_scratch.xdci.outstanding_threshold =
		((params->teth_prot == IPA_USB_MBIM) ? 1 : 2) *
		chan_params.chan_params.re_size;

	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_0)
		chan_params.chan_scratch.xdci.outstanding_threshold = 0;

	/* max_outstanding_tre is set in ipa3_request_gsi_channel() */
	result = ipa3_request_gsi_channel(&chan_params, out_params);
	if (result) {
+4 −0
Original line number Diff line number Diff line
@@ -719,6 +719,10 @@ int ipa3_request_gsi_channel(struct ipa_request_gsi_channel_params *params,
		sizeof(union __packed gsi_channel_scratch));
	ep->chan_scratch.xdci.max_outstanding_tre =
		params->chan_params.re_size * gsi_ep_cfg_ptr->ipa_if_tlv;

	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_0)
		ep->chan_scratch.xdci.max_outstanding_tre = 0;

	gsi_res = gsi_write_channel_scratch(ep->gsi_chan_hdl,
		params->chan_scratch);
	if (gsi_res != GSI_STATUS_SUCCESS) {
+6 −0
Original line number Diff line number Diff line
@@ -3656,6 +3656,12 @@ static int ipa_gsi_setup_channel(struct ipa_sys_connect_params *in,
	ch_scratch.gpi.max_outstanding_tre = gsi_ep_info->ipa_if_tlv *
		GSI_CHAN_RE_SIZE_16B;
	ch_scratch.gpi.outstanding_threshold = 2 * GSI_CHAN_RE_SIZE_16B;

	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_0) {
		ch_scratch.gpi.max_outstanding_tre = 0;
		ch_scratch.gpi.outstanding_threshold = 0;
	}

	result = gsi_write_channel_scratch(ep->gsi_chan_hdl, ch_scratch);
	if (result != GSI_STATUS_SUCCESS) {
		IPAERR("failed to write scratch %d\n", result);
+5 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2017 The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-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
@@ -302,6 +302,10 @@ static int ipa_mhi_start_gsi_channel(enum ipa_client_type client,
		ep_cfg->ipa_if_tlv * ch_props.re_size;
	ch_scratch.mhi.outstanding_threshold =
		min(ep_cfg->ipa_if_tlv / 2, 8) * ch_props.re_size;
	if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_0) {
		ch_scratch.mhi.max_outstanding_tre = 0;
		ch_scratch.mhi.outstanding_threshold = 0;
	}
	ch_scratch.mhi.oob_mod_threshold = 4;
	if (params->ch_ctx_host->brstmode == IPA_MHI_BURST_MODE_DEFAULT ||
		params->ch_ctx_host->brstmode == IPA_MHI_BURST_MODE_ENABLE) {