From 3203b7bf92edf7cc5c68464aa0095697ac89565d Mon Sep 17 00:00:00 2001 From: Tallapragada Kalyan Date: Sun, 21 Aug 2022 17:51:59 +0530 Subject: [PATCH] qcacmn: pipeline prefetch of tx comp ring for BE pipeline prefetch of tx comp ring for BE CRs-Fixed: 3272534 Change-Id: Ib1091b5163e75b56be08fbbf87c26b1c77638b76 --- dp/wifi3.0/dp_tx.c | 5 +++-- dp/wifi3.0/dp_tx.h | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index 7f3251d215..0e79a46a6d 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -5236,8 +5236,9 @@ more_data: num_avail_for_reap = quota; dp_srng_dst_inv_cached_descs(soc, hal_ring_hdl, num_avail_for_reap); - last_prefetched_hw_desc = dp_srng_dst_prefetch(hal_soc, hal_ring_hdl, - num_avail_for_reap); + last_prefetched_hw_desc = dp_srng_dst_prefetch_32_byte_desc(hal_soc, + hal_ring_hdl, + num_avail_for_reap); /* Find head descriptor from completion ring */ while (qdf_likely(num_avail_for_reap--)) { diff --git a/dp/wifi3.0/dp_tx.h b/dp/wifi3.0/dp_tx.h index f43234a8c2..b667c61b68 100644 --- a/dp/wifi3.0/dp_tx.h +++ b/dp/wifi3.0/dp_tx.h @@ -431,15 +431,21 @@ void dp_tx_prefetch_hw_sw_nbuf_desc(struct dp_soc *soc, } if (num_avail_for_reap && *last_prefetched_hw_desc) { - dp_tx_comp_get_prefetched_params_from_hal_desc( - soc, - *last_prefetched_hw_desc, - last_prefetched_sw_desc); - *last_prefetched_hw_desc = - hal_srng_dst_prefetch_next_cached_desc( + soc->arch_ops.tx_comp_get_params_from_hal_desc(soc, + *last_prefetched_hw_desc, + last_prefetched_sw_desc); + + if ((uintptr_t)*last_prefetched_hw_desc & 0x3f) + *last_prefetched_hw_desc = + hal_srng_dst_prefetch_next_cached_desc( hal_soc, hal_ring_hdl, (uint8_t *)*last_prefetched_hw_desc); + else + *last_prefetched_hw_desc = + hal_srng_dst_get_next_32_byte_desc(hal_soc, + hal_ring_hdl, + (uint8_t *)*last_prefetched_hw_desc); } } #else