Loading drivers/platform/msm/ipa/ipa_v2/ipa_dp.c +36 −0 Original line number Diff line number Diff line Loading @@ -899,6 +899,36 @@ static void switch_to_intr_rx_work_func(struct work_struct *work) ipa_handle_rx(sys); } /** * ipa_update_repl_threshold()- Update the repl_threshold for the client. * * Return value: None. */ void ipa_update_repl_threshold(enum ipa_client_type ipa_client) { int ep_idx; struct ipa_ep_context *ep; /* Check if ep is valid. */ ep_idx = ipa2_get_ep_mapping(ipa_client); if (ep_idx == -1) { IPADBG("Invalid IPA client\n"); return; } ep = &ipa_ctx->ep[ep_idx]; if (!ep->valid) { IPADBG("EP not valid/Not applicable for client.\n"); return; } /* * Determine how many buffers/descriptors remaining will * cause to drop below the yellow WM bar. */ ep->rx_replenish_threshold = ipa_get_sys_yellow_wm() / ep->sys->rx_buff_sz; } /** * ipa2_setup_sys_pipe() - Setup an IPA end-point in system-BAM mode and perform * IPA EP configuration Loading Loading @@ -1081,6 +1111,12 @@ int ipa2_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) */ ep->rx_replenish_threshold = ipa_get_sys_yellow_wm() / ep->sys->rx_buff_sz; /* Only when the WAN pipes are setup, actual threshold will * be read from the register. So update LAN_CONS ep again with * right value. */ if (sys_in->client == IPA_CLIENT_APPS_WAN_CONS) ipa_update_repl_threshold(IPA_CLIENT_APPS_LAN_CONS); } else { ep->connect.mode = SPS_MODE_DEST; ep->connect.source = SPS_DEV_HANDLE_MEM; Loading drivers/platform/msm/ipa/ipa_v2/ipa_i.h +1 −3 Original line number Diff line number Diff line Loading @@ -1939,7 +1939,5 @@ struct device *ipa2_get_dma_dev(void); int ipa2_release_wdi_mapping(u32 num_buffers, struct ipa_wdi_buffer_info *info); int ipa2_create_wdi_mapping(u32 num_buffers, struct ipa_wdi_buffer_info *info); void ipa_suspend_apps_pipes(bool suspend); void ipa_update_repl_threshold(enum ipa_client_type ipa_client); #endif /* _IPA_I_H_ */ Loading
drivers/platform/msm/ipa/ipa_v2/ipa_dp.c +36 −0 Original line number Diff line number Diff line Loading @@ -899,6 +899,36 @@ static void switch_to_intr_rx_work_func(struct work_struct *work) ipa_handle_rx(sys); } /** * ipa_update_repl_threshold()- Update the repl_threshold for the client. * * Return value: None. */ void ipa_update_repl_threshold(enum ipa_client_type ipa_client) { int ep_idx; struct ipa_ep_context *ep; /* Check if ep is valid. */ ep_idx = ipa2_get_ep_mapping(ipa_client); if (ep_idx == -1) { IPADBG("Invalid IPA client\n"); return; } ep = &ipa_ctx->ep[ep_idx]; if (!ep->valid) { IPADBG("EP not valid/Not applicable for client.\n"); return; } /* * Determine how many buffers/descriptors remaining will * cause to drop below the yellow WM bar. */ ep->rx_replenish_threshold = ipa_get_sys_yellow_wm() / ep->sys->rx_buff_sz; } /** * ipa2_setup_sys_pipe() - Setup an IPA end-point in system-BAM mode and perform * IPA EP configuration Loading Loading @@ -1081,6 +1111,12 @@ int ipa2_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) */ ep->rx_replenish_threshold = ipa_get_sys_yellow_wm() / ep->sys->rx_buff_sz; /* Only when the WAN pipes are setup, actual threshold will * be read from the register. So update LAN_CONS ep again with * right value. */ if (sys_in->client == IPA_CLIENT_APPS_WAN_CONS) ipa_update_repl_threshold(IPA_CLIENT_APPS_LAN_CONS); } else { ep->connect.mode = SPS_MODE_DEST; ep->connect.source = SPS_DEV_HANDLE_MEM; Loading
drivers/platform/msm/ipa/ipa_v2/ipa_i.h +1 −3 Original line number Diff line number Diff line Loading @@ -1939,7 +1939,5 @@ struct device *ipa2_get_dma_dev(void); int ipa2_release_wdi_mapping(u32 num_buffers, struct ipa_wdi_buffer_info *info); int ipa2_create_wdi_mapping(u32 num_buffers, struct ipa_wdi_buffer_info *info); void ipa_suspend_apps_pipes(bool suspend); void ipa_update_repl_threshold(enum ipa_client_type ipa_client); #endif /* _IPA_I_H_ */