Browse Source

ipa: Enable filtering on test pipes on debug builds

For the kernel tests we want filtering support enabled
on the test pipes on debug builds.
This change adds new DT HW mode <4> for HW in test mode.
In this mode the test pipes will support filtering.

Change-Id: I75effad603704f41c215385c62b09e46f9a019c8
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
Ilia Lin 4 years ago
parent
commit
df14acc05f

+ 3 - 0
drivers/platform/msm/ipa/ipa_v3/ipa_i.h

@@ -1409,12 +1409,15 @@ struct ipa3_ipv6ct_mem {
  * @IPA_HW_Virtual: IPA hardware supporting virtual memory allocation
  * @IPA_HW_PCIE: IPA hardware supporting memory allocation over PCIE Bridge
  * @IPA_HW_Emulation: IPA emulation hardware
+ * @IPA_HW_Test: Regular IPA hardware in test mode (for
+ *             kernel-tests)
  */
 enum ipa3_hw_mode {
 	IPA_HW_MODE_NORMAL    = 0,
 	IPA_HW_MODE_VIRTUAL   = 1,
 	IPA_HW_MODE_PCIE      = 2,
 	IPA_HW_MODE_EMULATION = 3,
+	IPA_HW_MODE_TEST      = 4,
 };
 
 /*

+ 2 - 1
drivers/platform/msm/ipa/ipa_v3/ipa_utils.c

@@ -6874,7 +6874,8 @@ void ipa_init_ep_flt_bitmap(void)
 		if (ipa3_ep_mapping[hw_idx][cl].support_flt &&
 		    (!IPA_CLIENT_IS_TEST(cl) ||
 		     ipa3_ctx->ipa3_hw_mode == IPA_HW_MODE_VIRTUAL ||
-		     ipa3_ctx->ipa3_hw_mode == IPA_HW_MODE_EMULATION)) {
+		     ipa3_ctx->ipa3_hw_mode == IPA_HW_MODE_EMULATION ||
+		     ipa3_ctx->ipa3_hw_mode == IPA_HW_MODE_TEST)) {
 			gsi_ep_ptr =
 				&ipa3_ep_mapping[hw_idx][cl].ipa_gsi_ep_info;
 			pipe_num = gsi_ep_ptr->ipa_ep_num;