Loading drivers/platform/msm/ipa/ipa_dp.c +16 −8 Original line number Original line Diff line number Diff line Loading @@ -1060,6 +1060,12 @@ int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) ep->connect.source = ipa_ctx->bam_handle; ep->connect.source = ipa_ctx->bam_handle; ep->connect.dest_pipe_index = ipa_ctx->a5_pipe_index++; ep->connect.dest_pipe_index = ipa_ctx->a5_pipe_index++; ep->connect.src_pipe_index = ipa_ep_idx; ep->connect.src_pipe_index = ipa_ep_idx; /* * 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; } else { } else { ep->connect.mode = SPS_MODE_DEST; ep->connect.mode = SPS_MODE_DEST; ep->connect.source = SPS_DEV_HANDLE_MEM; ep->connect.source = SPS_DEV_HANDLE_MEM; Loading Loading @@ -1779,6 +1785,7 @@ static void ipa_fast_replenish_rx_cache(struct ipa_sys_context *sys) queue_work(sys->repl_wq, &sys->repl_work); queue_work(sys->repl_wq, &sys->repl_work); if (rx_len_cached <= sys->ep->rx_replenish_threshold) { if (rx_len_cached == 0) { if (rx_len_cached == 0) { if (sys->ep->client == IPA_CLIENT_APPS_WAN_CONS) if (sys->ep->client == IPA_CLIENT_APPS_WAN_CONS) IPA_STATS_INC_CNT(ipa_ctx->stats.wan_rx_empty); IPA_STATS_INC_CNT(ipa_ctx->stats.wan_rx_empty); Loading @@ -1786,6 +1793,7 @@ static void ipa_fast_replenish_rx_cache(struct ipa_sys_context *sys) IPA_STATS_INC_CNT(ipa_ctx->stats.lan_rx_empty); IPA_STATS_INC_CNT(ipa_ctx->stats.lan_rx_empty); else else WARN_ON(1); WARN_ON(1); } queue_delayed_work(sys->wq, &sys->replenish_rx_work, queue_delayed_work(sys->wq, &sys->replenish_rx_work, msecs_to_jiffies(1)); msecs_to_jiffies(1)); } } Loading drivers/platform/msm/ipa/ipa_i.h +6 −1 Original line number Original line Diff line number Diff line Loading @@ -498,6 +498,10 @@ struct ipa_wlan_comm_memb { * @skip_ep_cfg: boolean field that determines if EP should be configured * @skip_ep_cfg: boolean field that determines if EP should be configured * by IPA driver * by IPA driver * @keep_ipa_awake: when true, IPA will not be clock gated * @keep_ipa_awake: when true, IPA will not be clock gated * @rx_replenish_threshold: Indicates the WM value which requires the RX * descriptors replenish function to be called to * avoid the RX pipe to run out of descriptors * and cause HOLB. */ */ struct ipa_ep_context { struct ipa_ep_context { int valid; int valid; Loading Loading @@ -525,7 +529,7 @@ struct ipa_ep_context { bool keep_ipa_awake; bool keep_ipa_awake; struct ipa_wlan_stats wstats; struct ipa_wlan_stats wstats; u32 wdi_state; u32 wdi_state; u32 rx_replenish_threshold; /* sys MUST be the last element of this struct */ /* sys MUST be the last element of this struct */ struct ipa_sys_context *sys; struct ipa_sys_context *sys; }; }; Loading Loading @@ -1583,6 +1587,7 @@ int ipa_uc_mhi_stop_event_update_channel(int channelHandle); int ipa_uc_mhi_print_stats(char *dbg_buff, int size); int ipa_uc_mhi_print_stats(char *dbg_buff, int size); int ipa_uc_memcpy(phys_addr_t dest, phys_addr_t src, int len); int ipa_uc_memcpy(phys_addr_t dest, phys_addr_t src, int len); u32 ipa_get_num_pipes(void); u32 ipa_get_num_pipes(void); u32 ipa_get_sys_yellow_wm(void); int ipa_smmu_map_peer_bam(unsigned long dev); int ipa_smmu_map_peer_bam(unsigned long dev); int ipa_smmu_unmap_peer_bam(unsigned long dev); int ipa_smmu_unmap_peer_bam(unsigned long dev); struct ipa_smmu_cb_ctx *ipa_get_wlan_smmu_ctx(void); struct ipa_smmu_cb_ctx *ipa_get_wlan_smmu_ctx(void); Loading drivers/platform/msm/ipa/ipa_reg.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -92,6 +92,7 @@ * IPA HW 2.6/2.6L Registers * IPA HW 2.6/2.6L Registers */ */ #define IPA_ENABLED_PIPES_OFST 0x000005DC #define IPA_ENABLED_PIPES_OFST 0x000005DC #define IPA_YELLOW_MARKER_SYS_CFG_OFST 0x00000728 /* /* * End of IPA 2.6/2.6L Registers * End of IPA 2.6/2.6L Registers */ */ Loading drivers/platform/msm/ipa/ipa_utils.c +16 −0 Original line number Original line Diff line number Diff line Loading @@ -4877,3 +4877,19 @@ int ipa_disable_apps_wan_cons_deaggr(uint32_t agg_size, uint32_t agg_count) return res; return res; } } EXPORT_SYMBOL(ipa_disable_apps_wan_cons_deaggr); EXPORT_SYMBOL(ipa_disable_apps_wan_cons_deaggr); /** * ipa_get_sys_yellow_wm()- Return yellow WM value for IPA SYS pipes. * * Return value: IPA_YELLOW_MARKER_SYS_CFG_OFST register if IPA_HW_v2.6L, * 0 otherwise. */ u32 ipa_get_sys_yellow_wm(void) { if (ipa_ctx->ipa_hw_type == IPA_HW_v2_6L) return ipa_read_reg(ipa_ctx->mmio, IPA_YELLOW_MARKER_SYS_CFG_OFST); else return 0; } EXPORT_SYMBOL(ipa_get_sys_yellow_wm); Loading
drivers/platform/msm/ipa/ipa_dp.c +16 −8 Original line number Original line Diff line number Diff line Loading @@ -1060,6 +1060,12 @@ int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) ep->connect.source = ipa_ctx->bam_handle; ep->connect.source = ipa_ctx->bam_handle; ep->connect.dest_pipe_index = ipa_ctx->a5_pipe_index++; ep->connect.dest_pipe_index = ipa_ctx->a5_pipe_index++; ep->connect.src_pipe_index = ipa_ep_idx; ep->connect.src_pipe_index = ipa_ep_idx; /* * 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; } else { } else { ep->connect.mode = SPS_MODE_DEST; ep->connect.mode = SPS_MODE_DEST; ep->connect.source = SPS_DEV_HANDLE_MEM; ep->connect.source = SPS_DEV_HANDLE_MEM; Loading Loading @@ -1779,6 +1785,7 @@ static void ipa_fast_replenish_rx_cache(struct ipa_sys_context *sys) queue_work(sys->repl_wq, &sys->repl_work); queue_work(sys->repl_wq, &sys->repl_work); if (rx_len_cached <= sys->ep->rx_replenish_threshold) { if (rx_len_cached == 0) { if (rx_len_cached == 0) { if (sys->ep->client == IPA_CLIENT_APPS_WAN_CONS) if (sys->ep->client == IPA_CLIENT_APPS_WAN_CONS) IPA_STATS_INC_CNT(ipa_ctx->stats.wan_rx_empty); IPA_STATS_INC_CNT(ipa_ctx->stats.wan_rx_empty); Loading @@ -1786,6 +1793,7 @@ static void ipa_fast_replenish_rx_cache(struct ipa_sys_context *sys) IPA_STATS_INC_CNT(ipa_ctx->stats.lan_rx_empty); IPA_STATS_INC_CNT(ipa_ctx->stats.lan_rx_empty); else else WARN_ON(1); WARN_ON(1); } queue_delayed_work(sys->wq, &sys->replenish_rx_work, queue_delayed_work(sys->wq, &sys->replenish_rx_work, msecs_to_jiffies(1)); msecs_to_jiffies(1)); } } Loading
drivers/platform/msm/ipa/ipa_i.h +6 −1 Original line number Original line Diff line number Diff line Loading @@ -498,6 +498,10 @@ struct ipa_wlan_comm_memb { * @skip_ep_cfg: boolean field that determines if EP should be configured * @skip_ep_cfg: boolean field that determines if EP should be configured * by IPA driver * by IPA driver * @keep_ipa_awake: when true, IPA will not be clock gated * @keep_ipa_awake: when true, IPA will not be clock gated * @rx_replenish_threshold: Indicates the WM value which requires the RX * descriptors replenish function to be called to * avoid the RX pipe to run out of descriptors * and cause HOLB. */ */ struct ipa_ep_context { struct ipa_ep_context { int valid; int valid; Loading Loading @@ -525,7 +529,7 @@ struct ipa_ep_context { bool keep_ipa_awake; bool keep_ipa_awake; struct ipa_wlan_stats wstats; struct ipa_wlan_stats wstats; u32 wdi_state; u32 wdi_state; u32 rx_replenish_threshold; /* sys MUST be the last element of this struct */ /* sys MUST be the last element of this struct */ struct ipa_sys_context *sys; struct ipa_sys_context *sys; }; }; Loading Loading @@ -1583,6 +1587,7 @@ int ipa_uc_mhi_stop_event_update_channel(int channelHandle); int ipa_uc_mhi_print_stats(char *dbg_buff, int size); int ipa_uc_mhi_print_stats(char *dbg_buff, int size); int ipa_uc_memcpy(phys_addr_t dest, phys_addr_t src, int len); int ipa_uc_memcpy(phys_addr_t dest, phys_addr_t src, int len); u32 ipa_get_num_pipes(void); u32 ipa_get_num_pipes(void); u32 ipa_get_sys_yellow_wm(void); int ipa_smmu_map_peer_bam(unsigned long dev); int ipa_smmu_map_peer_bam(unsigned long dev); int ipa_smmu_unmap_peer_bam(unsigned long dev); int ipa_smmu_unmap_peer_bam(unsigned long dev); struct ipa_smmu_cb_ctx *ipa_get_wlan_smmu_ctx(void); struct ipa_smmu_cb_ctx *ipa_get_wlan_smmu_ctx(void); Loading
drivers/platform/msm/ipa/ipa_reg.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -92,6 +92,7 @@ * IPA HW 2.6/2.6L Registers * IPA HW 2.6/2.6L Registers */ */ #define IPA_ENABLED_PIPES_OFST 0x000005DC #define IPA_ENABLED_PIPES_OFST 0x000005DC #define IPA_YELLOW_MARKER_SYS_CFG_OFST 0x00000728 /* /* * End of IPA 2.6/2.6L Registers * End of IPA 2.6/2.6L Registers */ */ Loading
drivers/platform/msm/ipa/ipa_utils.c +16 −0 Original line number Original line Diff line number Diff line Loading @@ -4877,3 +4877,19 @@ int ipa_disable_apps_wan_cons_deaggr(uint32_t agg_size, uint32_t agg_count) return res; return res; } } EXPORT_SYMBOL(ipa_disable_apps_wan_cons_deaggr); EXPORT_SYMBOL(ipa_disable_apps_wan_cons_deaggr); /** * ipa_get_sys_yellow_wm()- Return yellow WM value for IPA SYS pipes. * * Return value: IPA_YELLOW_MARKER_SYS_CFG_OFST register if IPA_HW_v2.6L, * 0 otherwise. */ u32 ipa_get_sys_yellow_wm(void) { if (ipa_ctx->ipa_hw_type == IPA_HW_v2_6L) return ipa_read_reg(ipa_ctx->mmio, IPA_YELLOW_MARKER_SYS_CFG_OFST); else return 0; } EXPORT_SYMBOL(ipa_get_sys_yellow_wm);