summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavinder Konka <rkonka@codeaurora.org>2016-03-30 14:32:10 +0530
committerJeevan Shriram <jshriram@codeaurora.org>2016-05-05 15:05:50 -0700
commit7a0338964f9138ec76d3fcc6bd9054bb3e83177a (patch)
tree8df7e7bcde1d00a5ae3b276cf616910a781912be
parente12ea77bd98b510e2c2986ebbbf59e6fead6d0c5 (diff)
ipa: Fix holb monitor response handling from Uc
At the point when ISR routine is triggered, if the IPA clients are 0, ISR handling will be deferred using power_mgmt_wq and same workqueue is used to send holb monitoring command after Uc is loaded. As a result response to holb monitoring command will not be honored. Make a change to use a different wq for sending holb monitoring command. Change-Id: I611155901e928fa8d9bbcbdf2511cd98aa36df2c Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com> Signed-off-by: Sridhar Ancha <sancha@codeaurora.org>
-rw-r--r--drivers/platform/msm/ipa/ipa_v2/ipa_uc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/platform/msm/ipa/ipa_v2/ipa_uc.c b/drivers/platform/msm/ipa/ipa_v2/ipa_uc.c
index b49815b24bc2..d529622f1e19 100644
--- a/drivers/platform/msm/ipa/ipa_v2/ipa_uc.c
+++ b/drivers/platform/msm/ipa/ipa_v2/ipa_uc.c
@@ -17,7 +17,9 @@
#define IPA_PKT_FLUSH_TO_US 100
#define IPA_UC_POLL_SLEEP_USEC 100
#define IPA_UC_POLL_MAX_RETRY 10000
+#define HOLB_WORKQUEUE_NAME "ipa_holb_wq"
+static struct workqueue_struct *ipa_holb_wq;
static void ipa_start_monitor_holb(struct work_struct *work);
static DECLARE_WORK(ipa_holb_work, ipa_start_monitor_holb);
@@ -470,7 +472,7 @@ static void ipa_uc_response_hdlr(enum ipa_irq_type interrupt,
* pipe if valid.
*/
if (ipa_ctx->ipa_hw_type == IPA_HW_v2_6L)
- queue_work(ipa_ctx->power_mgmt_wq, &ipa_holb_work);
+ queue_work(ipa_holb_wq, &ipa_holb_work);
} else if (ipa_ctx->uc_ctx.uc_sram_mmio->responseOp ==
IPA_HW_2_CPU_RESPONSE_CMD_COMPLETED) {
uc_rsp.raw32b = ipa_ctx->uc_ctx.uc_sram_mmio->responseParams;
@@ -508,6 +510,13 @@ int ipa_uc_interface_init(void)
return 0;
}
+ ipa_holb_wq = create_singlethread_workqueue(
+ HOLB_WORKQUEUE_NAME);
+ if (!ipa_holb_wq) {
+ IPAERR("HOLB workqueue creation failed\n");
+ return -ENOMEM;
+ }
+
mutex_init(&ipa_ctx->uc_ctx.uc_lock);
if (ipa_ctx->ipa_hw_type >= IPA_HW_v2_5) {