Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9f1338f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: change default low watermark for rx buffers"

parents ee3ea93d a8ef5fd9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1077,7 +1077,7 @@ void ipa_update_repl_threshold(enum ipa_client_type ipa_client)
	 * 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->rx_replenish_threshold = ipa_get_sys_yellow_wm(ep->sys)
					/ ep->sys->rx_buff_sz;
}

@@ -1271,7 +1271,7 @@ int ipa2_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl)
		 * 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->rx_replenish_threshold = ipa_get_sys_yellow_wm(ep->sys)
						/ 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
+1 −1
Original line number Diff line number Diff line
@@ -1907,7 +1907,7 @@ int ipa2_uc_mhi_stop_event_update_channel(int channelHandle);
int ipa2_uc_mhi_print_stats(char *dbg_buff, int size);
int ipa_uc_memcpy(phys_addr_t dest, phys_addr_t src, int len);
u32 ipa_get_num_pipes(void);
u32 ipa_get_sys_yellow_wm(void);
u32 ipa_get_sys_yellow_wm(struct ipa_sys_context *sys);
struct ipa_smmu_cb_ctx *ipa2_get_smmu_ctx(void);
struct ipa_smmu_cb_ctx *ipa2_get_wlan_smmu_ctx(void);
struct ipa_smmu_cb_ctx *ipa2_get_uc_smmu_ctx(void);
+11 −5
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@
#define IPA_EOT_COAL_GRAN_MIN (1)
#define IPA_EOT_COAL_GRAN_MAX (16)

#define IPA_DEFAULT_SYS_YELLOW_WM 32

#define IPA_AGGR_BYTE_LIMIT (\
		IPA_ENDP_INIT_AGGR_N_AGGR_BYTE_LIMIT_BMSK >> \
		IPA_ENDP_INIT_AGGR_N_AGGR_BYTE_LIMIT_SHFT)
@@ -5137,15 +5139,19 @@ int ipa2_bind_api_controller(enum ipa_hw_type ipa_hw_type,
 * 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.
 *               IPA_DEFAULT_SYS_YELLOW_WM otherwise.
 */
u32 ipa_get_sys_yellow_wm(void)
u32 ipa_get_sys_yellow_wm(struct ipa_sys_context *sys)
{
	if (ipa_ctx->ipa_hw_type == IPA_HW_v2_6L)
	if (ipa_ctx->ipa_hw_type == IPA_HW_v2_6L) {
		return ipa_read_reg(ipa_ctx->mmio,
			IPA_YELLOW_MARKER_SYS_CFG_OFST);
	else
	} else {
		if (!sys)
			return 0;

		return IPA_DEFAULT_SYS_YELLOW_WM * sys->rx_buff_sz;
	}
}
EXPORT_SYMBOL(ipa_get_sys_yellow_wm);

+3 −1
Original line number Diff line number Diff line
@@ -67,6 +67,8 @@
/* The below virtual channel cannot be used by any entity */
#define IPA_GSI_CH_20_WA_VIRT_CHAN 29

#define IPA_DEFAULT_SYS_YELLOW_WM 32

static struct sk_buff *ipa3_get_skb_ipa_rx(unsigned int len, gfp_t flags);
static void ipa3_replenish_wlan_rx_cache(struct ipa3_sys_context *sys);
static void ipa3_replenish_rx_cache(struct ipa3_sys_context *sys);
@@ -2272,7 +2274,7 @@ static void ipa3_fast_replenish_rx_cache(struct ipa3_sys_context *sys)

	queue_work(sys->repl_wq, &sys->repl_work);

	if (rx_len_cached == 0) {
	if (rx_len_cached <= IPA_DEFAULT_SYS_YELLOW_WM) {
		if (sys->ep->client == IPA_CLIENT_APPS_WAN_CONS)
			IPA_STATS_INC_CNT(ipa3_ctx->stats.wan_rx_empty);
		else if (sys->ep->client == IPA_CLIENT_APPS_LAN_CONS)