From 3fb34cbda2ab754873fd9bc28988e95a6a9eb418 Mon Sep 17 00:00:00 2001 From: Bojun Pan Date: Wed, 17 Feb 2021 14:00:23 -0800 Subject: [PATCH] msm: ipa: fix the IPA clock vote on non-NAPI case Fix the potiental addition reference counts issue. Change-Id: Ib01707ab00db7413c46eee7ccb8d74460344d047 --- drivers/platform/msm/ipa/ipa_v3/ipa_dp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c index a89e44c642a9..b2b1903f7ac9 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c @@ -4608,7 +4608,7 @@ static void ipa_gsi_irq_tx_notify_cb(struct gsi_chan_xfer_notify *notify) void __ipa_gsi_irq_rx_scedule_poll(struct ipa3_sys_context *sys) { - bool clk_off; + bool clk_off = true; enum ipa_client_type client_type; atomic_set(&sys->curr_polling_state, 1); @@ -4628,7 +4628,9 @@ void __ipa_gsi_irq_rx_scedule_poll(struct ipa3_sys_context *sys) * switch. Use the active no block instead * where we would have ref counts. */ - clk_off = IPA_ACTIVE_CLIENTS_INC_EP_NO_BLOCK(client_type); + if (sys->napi_obj || + IPA_CLIENT_IS_LOW_LAT_CONS(sys->ep->client)) + clk_off = IPA_ACTIVE_CLIENTS_INC_EP_NO_BLOCK(client_type); if (!clk_off && sys->napi_obj) { trace_ipa3_napi_schedule(sys->ep->client); napi_schedule(sys->napi_obj);