瀏覽代碼

msm: ipa3: Fix IPA clk is not going to gated state.

Due to improper decrement of some IPA clients, the
active client count is greater than zero, due to
which clk not going to gated state. Now doing
proper decrement of those clients.

Change-Id: I57301cdfc34d48874d26fe0b0ee90913c5e6c44b
Signed-off-by: Piyush Dhyani <[email protected]>
Piyush Dhyani 3 年之前
父節點
當前提交
5403d2fe9f
共有 2 個文件被更改,包括 11 次插入3 次删除
  1. 4 2
      drivers/platform/msm/ipa/ipa_v3/ipa.c
  2. 7 1
      drivers/platform/msm/ipa/ipa_v3/ipa_dp.c

+ 4 - 2
drivers/platform/msm/ipa/ipa_v3/ipa.c

@@ -3156,12 +3156,14 @@ static long ipa3_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 	case IPA_IOC_RM_ADD_DEPENDENCY:
 		/* IPA RM is deprecate because IPA PM is used */
 		IPAERR("using obselete command: IPA_IOC_RM_ADD_DEPENDENCY");
-		return -EINVAL;
+		retval = -EINVAL;
+		break;
 
 	case IPA_IOC_RM_DEL_DEPENDENCY:
 		/* IPA RM is deprecate because IPA PM is used */
 		IPAERR("using obselete command: IPA_IOC_RM_DEL_DEPENDENCY");
-		return -EINVAL;
+		retval = -EINVAL;
+		break;
 
 	case IPA_IOC_GENERATE_FLT_EQ:
 		{

+ 7 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_dp.c

@@ -1019,6 +1019,7 @@ static int ipa3_rx_switch_to_intr_mode(struct ipa3_sys_context *sys)
  */
 static void ipa3_handle_rx(struct ipa3_sys_context *sys)
 {
+	enum ipa_client_type client_type;
 	int inactive_cycles;
 	int cnt;
 	int ret;
@@ -1052,7 +1053,12 @@ start_poll:
 	if (ret == -GSI_STATUS_PENDING_IRQ)
 		goto start_poll;
 
-	IPA_ACTIVE_CLIENTS_DEC_EP(sys->ep->client);
+	if (IPA_CLIENT_IS_WAN_CONS(sys->ep->client))
+		client_type = IPA_CLIENT_APPS_WAN_COAL_CONS;
+	else
+		client_type = sys->ep->client;
+
+	IPA_ACTIVE_CLIENTS_DEC_EP(client_type);
 }
 
 static void ipa3_switch_to_intr_rx_work_func(struct work_struct *work)