msm: ipa3: Disable HOLB for ODL pipe during suspend

1. Disable HOLB for ODL pipe during suspend to avoid dropping the packet
2. Enable HOLB while unsuspend the pipes.
3. Enable drop stats for ODL pipe.

Change-Id: Id0a5871ebe4a0925c60dea39f197af9e1892d05e
Signed-off-by: Ashok Vuyyuru <avuyyuru@codeaurora.org
This commit is contained in:
Ashok Vuyyuru 2021-06-10 23:38:33 +05:30 committed by Chaitanya Pratapa
parent 3cb33329d4
commit 719233800c
2 changed files with 23 additions and 0 deletions

View File

@ -1533,6 +1533,9 @@ int ipa_drop_stats_init(void)
/* Always enable drop stats for USB DPL Pipe. */
pipe_bitmask |= IPA_CLIENT_BIT_32(IPA_CLIENT_USB_DPL_CONS);
/* Always enable drop stats for ODL DPL Pipe. */
pipe_bitmask |= IPA_CLIENT_BIT_32(IPA_CLIENT_ODL_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.

View File

@ -8784,6 +8784,8 @@ void ipa3_force_close_coal(void)
int ipa3_suspend_apps_pipes(bool suspend)
{
int res;
struct ipa_ep_cfg_holb holb_cfg;
int odl_ep_idx;
/* As per HPG first need start/stop coalescing channel
* then default one. Coalescing client number was greater then
@ -8805,6 +8807,24 @@ int ipa3_suspend_apps_pipes(bool suspend)
if (res == -EAGAIN)
goto undo_odl_cons;
odl_ep_idx = ipa3_get_ep_mapping(IPA_CLIENT_ODL_DPL_CONS);
if (odl_ep_idx != IPA_EP_NOT_ALLOCATED && ipa3_ctx->ep[odl_ep_idx].valid) {
memset(&holb_cfg, 0, sizeof(holb_cfg));
if (suspend)
holb_cfg.en = 0;
else
holb_cfg.en = 1;
ipahal_write_reg_n_fields(IPA_ENDP_INIT_HOL_BLOCK_EN_n,
odl_ep_idx, &holb_cfg);
/* IPA4.5 issue requires HOLB_EN to be written twice */
if (ipa3_ctx->ipa_hw_type >= IPA_HW_v4_5 && holb_cfg.en)
ipahal_write_reg_n_fields(
IPA_ENDP_INIT_HOL_BLOCK_EN_n,
odl_ep_idx, &holb_cfg);
}
res = _ipa_suspend_resume_pipe(IPA_CLIENT_APPS_WAN_LOW_LAT_CONS,
suspend);
if (res == -EAGAIN)