summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorSkylar Chang <chiaweic@codeaurora.org>2016-04-07 11:04:03 -0700
committerJeevan Shriram <jshriram@codeaurora.org>2016-04-19 19:43:54 -0700
commit6ff62f5f5115bf24cde754ffc6fb10b40cc6256d (patch)
treec30be60c0b1d3be1b38e636953ee4fac57b0b431 /drivers/platform
parentfe52a162c9ca0b5943968bb7447285411d11cc9f (diff)
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>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/msm/ipa/ipa_v3/ipa_dp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c
index d3f24b9403f0..6bf4008967c6 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c
@@ -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;