diff options
| author | Skylar Chang <chiaweic@codeaurora.org> | 2017-03-23 16:17:14 -0700 |
|---|---|---|
| committer | Skylar Chang <chiaweic@codeaurora.org> | 2017-03-23 16:36:32 -0700 |
| commit | b07874c6eb699634a305c74c16c6e9dfbedb62e3 (patch) | |
| tree | 4c611336fa4e08927d36b1e1d10c184ec998ac7d | |
| parent | 630218f7109215471e1f43c2200f6bdc98f92f93 (diff) | |
msm: ipa: add retry to channel stop
Add a retry mechanism when trying to stop a producer pipe.
This is to avoid a timeout on stop channel when IPA is busy.
Change-Id: If9e0df976def1195171730624e02c185142e2964
CRs-Fixed: 2024084
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
| -rw-r--r-- | drivers/platform/msm/ipa/ipa_v3/ipa_utils.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c index 2f28ba673d5a..c8ff06ddda87 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c @@ -3565,11 +3565,6 @@ int ipa3_stop_gsi_channel(u32 clnt_hdl) memset(&mem, 0, sizeof(mem)); - if (IPA_CLIENT_IS_PROD(ep->client)) { - res = gsi_stop_channel(ep->gsi_chan_hdl); - goto end_sequence; - } - for (i = 0; i < IPA_GSI_CHANNEL_STOP_MAX_RETRY; i++) { IPADBG("Calling gsi_stop_channel\n"); res = gsi_stop_channel(ep->gsi_chan_hdl); @@ -3577,12 +3572,14 @@ int ipa3_stop_gsi_channel(u32 clnt_hdl) if (res != -GSI_STATUS_AGAIN && res != -GSI_STATUS_TIMED_OUT) goto end_sequence; - IPADBG("Inject a DMA_TASK with 1B packet to IPA and retry\n"); - /* Send a 1B packet DMA_TASK to IPA and try again */ - res = ipa3_inject_dma_task_for_gsi(); - if (res) { - IPAERR("Failed to inject DMA TASk for GSI\n"); - goto end_sequence; + if (IPA_CLIENT_IS_CONS(ep->client)) { + IPADBG("Inject a DMA_TASK with 1B packet to IPA\n"); + /* Send a 1B packet DMA_TASK to IPA and try again */ + res = ipa3_inject_dma_task_for_gsi(); + if (res) { + IPAERR("Failed to inject DMA TASk for GSI\n"); + goto end_sequence; + } } /* sleep for short period to flush IPA */ |
