msm: ipa: enable drop stats for USB/WLAN and DPL pipes

With HOLB monitoring, it is beneficial to enable drop
stats for USB and WLAN pipes. Also enable drop stats for
DPL pipe.

Change-Id: I24df7041a4056d2875f6b14d50ab52beb1459eeb
Signed-off-by: Chaitanya Pratapa <cpratapa@codeaurora.org>
This commit is contained in:
Chaitanya Pratapa 2020-06-26 20:09:06 -07:00 • committed by Gerrit - the friendly Code Review server
commit a5fbe3bdc5
3 changed files with 29 additions and 0 deletions

View file

@ -6396,6 +6396,12 @@ static int ipa3_post_init(const struct ipa3_plat_drv_res *resource_p,
else
IPADBG(":stats init ok\n");
result = ipa_drop_stats_init();
if (result)
IPAERR("fail to init stats %d\n", result);
else
IPADBG(":stats init ok\n");
ipa3_register_panic_hdlr();
ipa3_debugfs_init();

View file

@ -1521,6 +1521,27 @@ int ipa_set_flt_rt_stats(int index, struct ipa_flt_rt_stats stats)
return __ipa_set_flt_rt_stats(index, stats);
}
int ipa_drop_stats_init(void)
{
u32 pipe_bitmask = 0;
/* If HOLB Monitoring is enabled, enable drop stats for USB and WLAN. */
if (ipa3_ctx->uc_ctx.ipa_use_uc_holb_monitor)
pipe_bitmask |= IPA_CLIENT_BIT_32(IPA_CLIENT_USB_CONS) |
IPA_CLIENT_BIT_32(IPA_CLIENT_WLAN2_CONS);
/* Always enable drop stats for USB DPL Pipe. */
pipe_bitmask |= IPA_CLIENT_BIT_32(IPA_CLIENT_USB_DPL_CONS);
/* Currently we have option to enable drop stats using debugfs.
* To enable drop stats for a different pipe, first user needs
* to query drop stats to get the current stats and enable.
* TODO: to support dynamically caching drop stats.
*/
return ipa_init_drop_stats(pipe_bitmask);
}
int ipa_init_drop_stats(u32 pipe_bitmask)
{
struct ipahal_stats_init_pyld *pyld;

View file

@ -2970,6 +2970,8 @@ int ipa_reset_quota_stats(enum ipa_client_type client);
int ipa_reset_all_quota_stats(void);
int ipa_drop_stats_init(void);
int ipa_init_drop_stats(u32 pipe_bitmask);
int ipa_get_drop_stats(struct ipa_drop_stats_all *out);