ソースを参照

msm: ipa3: enable HOLB & drop stats for WAN, WAN COAL in >= IPA_HW_5_5

Adding changes to enable HOLB discard for Apps WAN default and
WAN coalescing pipes for >= IPA_HW_5_5. Also, enable drop stats
by default for the above in LA only and >= IPA_HW_5.5

Change-Id: I34f8028c0bcee46caddb74b9574791fa862abc64
Signed-off-by: Jagadeesh Ponduru <[email protected]>
Jagadeesh Ponduru 2 年 前
コミット
0f2a39d50a

+ 6 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_client.c

@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <asm/barrier.h>
@@ -89,6 +89,11 @@ int ipa3_enable_data_path(u32 clnt_hdl)
 				(ep->client == IPA_CLIENT_USB_CONS)) {
 			holb_cfg.tmr_val = IPA_HOLB_TMR_VAL_4_5;
 			holb_cfg.en = IPA_HOLB_TMR_EN;
+		} else if ((ipa3_ctx->ipa_hw_type >= IPA_HW_v5_5) &&
+				(ep->client == IPA_CLIENT_APPS_WAN_CONS ||
+				ep->client == IPA_CLIENT_APPS_WAN_COAL_CONS)) {
+			holb_cfg.tmr_val = IPA_HOLB_TMR_VAL_4_5;
+			holb_cfg.en = IPA_HOLB_TMR_EN;
 		} else {
 			holb_cfg.en = IPA_HOLB_TMR_DIS;
 			holb_cfg.tmr_val = 0;

+ 14 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_hw_stats.c

@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/debugfs.h>
@@ -1876,6 +1876,19 @@ int ipa_drop_stats_init(void)
 				&reg_idx);
 			pipe_bitmask[reg_idx] |= mask;
 		}
+
+		/* Add drop stats for WAN & WAN_COAL if IPA_HW >=5.5 */
+		if (ipa3_ctx->ipa_hw_type >= IPA_HW_v5_5) {
+			mask = ipa_hw_stats_get_ep_bit_n_idx(
+				IPA_CLIENT_APPS_WAN_CONS,
+				&reg_idx);
+			pipe_bitmask[reg_idx] |= mask;
+
+			mask = ipa_hw_stats_get_ep_bit_n_idx(
+				IPA_CLIENT_APPS_WAN_COAL_CONS,
+				&reg_idx);
+			pipe_bitmask[reg_idx] |= mask;
+		}
 	}
 
 	/* Currently we have option to enable drop stats using debugfs.