msm: ipa3: enable smart prefetch control for GPI
Enable smart prefetch control for GPI (sys) channels. This is done by configuring the channel scratch in GSI. CRs-Fixed: 1000819 Change-Id: Iac1687b9b26eed715a1055cca295daa7b46f8abd Acked-by: Ady Abraham <adya@qti.qualcomm.com> Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
This commit is contained in:
parent
fe52a162c9
commit
6ff62f5f51
1 changed files with 11 additions and 0 deletions
|
@ -3573,6 +3573,7 @@ static int ipa_gsi_setup_channel(struct ipa3_ep_context *ep)
|
|||
{
|
||||
struct gsi_evt_ring_props gsi_evt_ring_props;
|
||||
struct gsi_chan_props gsi_channel_props;
|
||||
union __packed gsi_channel_scratch ch_scratch;
|
||||
struct ipa_gsi_ep_config *gsi_ep_info;
|
||||
dma_addr_t dma_addr;
|
||||
int result;
|
||||
|
@ -3673,6 +3674,16 @@ static int ipa_gsi_setup_channel(struct ipa3_ep_context *ep)
|
|||
if (result != GSI_STATUS_SUCCESS)
|
||||
goto fail_alloc_channel;
|
||||
|
||||
memset(&ch_scratch, 0, sizeof(ch_scratch));
|
||||
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;
|
||||
result = gsi_write_channel_scratch(ep->gsi_chan_hdl, ch_scratch);
|
||||
if (result != GSI_STATUS_SUCCESS) {
|
||||
IPAERR("failed to write scratch %d\n", result);
|
||||
goto fail_start_channel;
|
||||
}
|
||||
|
||||
result = gsi_start_channel(ep->gsi_chan_hdl);
|
||||
if (result != GSI_STATUS_SUCCESS)
|
||||
goto fail_start_channel;
|
||||
|
|
Loading…
Add table
Reference in a new issue