Merge "msm: ipa3: Disable HOLB for ODL pipe during suspend"

This commit is contained in:
qctecmdr 2021-07-20 15:05:50 -07:00 • committed by Gerrit - the friendly Code Review server
commit bbeb3bfa7a
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)