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

Commit 3b5982bb authored by Gidon Studinski's avatar Gidon Studinski
Browse files

msm: ipa3: enable smart prefetch control for xDCI



Enable smart prefetch control for xDCI channels.
This is done by configuring the channel scratch in GSI.

Change-Id: I9a301da3c5426649b40069103d545e50bc75aad2
CRs-Fixed: 1004467
Signed-off-by: default avatarGidon Studinski <gidons@codeaurora.org>
parent 0fb411ab
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1229,7 +1229,7 @@ static int ipa3_usb_request_xdci_channel(
	chan_params.chan_params.ring_base_addr =
		params->xfer_ring_base_addr;
	chan_params.chan_params.ring_base_vaddr = NULL;
	chan_params.chan_params.use_db_eng = GSI_CHAN_DIRECT_MODE;
	chan_params.chan_params.use_db_eng = GSI_CHAN_DB_MODE;
	chan_params.chan_params.max_prefetch = GSI_ONE_PREFETCH_SEG;
	if (params->dir == GSI_CHAN_DIR_FROM_GSI)
		chan_params.chan_params.low_weight =
@@ -1250,6 +1250,9 @@ static int ipa3_usb_request_xdci_channel(
		params->xfer_scratch.depcmd_low_addr;
	chan_params.chan_scratch.xdci.depcmd_hi_addr =
		params->xfer_scratch.depcmd_hi_addr;
	chan_params.chan_scratch.xdci.outstanding_threshold =
		((params->teth_prot == IPA_USB_MBIM) ? 1 : 2) *
		chan_params.chan_params.re_size;
	/* max_outstanding_tre is set in ipa3_request_gsi_channel() */
	result = ipa3_request_gsi_channel(&chan_params, out_params);
	if (result) {
+2 −1
Original line number Diff line number Diff line
@@ -1152,7 +1152,8 @@ int ipa3_request_gsi_channel(struct ipa_request_gsi_channel_params *params,

	memcpy(&ep->chan_scratch, &params->chan_scratch,
		sizeof(union __packed gsi_channel_scratch));
	ep->chan_scratch.xdci.max_outstanding_tre = gsi_ep_cfg_ptr->ipa_if_aos;
	ep->chan_scratch.xdci.max_outstanding_tre =
		params->chan_params.re_size * gsi_ep_cfg_ptr->ipa_if_tlv;
	gsi_res = gsi_write_channel_scratch(ep->gsi_chan_hdl,
		params->chan_scratch);
	if (gsi_res != GSI_STATUS_SUCCESS) {