diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index d9f646abf9..f509af905d 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -1433,7 +1433,7 @@ dp_tx_hw_enqueue(struct dp_soc *soc, struct dp_vdev *vdev, ring_access_fail: if (hif_pm_runtime_get(soc->hif_handle, - RTPM_ID_DW_TX_HW_ENQUEUE) == 0) { + RTPM_ID_DW_TX_HW_ENQUEUE, true) == 0) { dp_tx_ring_access_end(soc, hal_ring_hdl, coalesce); hif_pm_runtime_put(soc->hif_handle, RTPM_ID_DW_TX_HW_ENQUEUE); diff --git a/hal/wifi3.0/hal_reo.c b/hal/wifi3.0/hal_reo.c index 87ecd528e9..93bd6ae872 100644 --- a/hal/wifi3.0/hal_reo.c +++ b/hal/wifi3.0/hal_reo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -455,7 +455,7 @@ inline int hal_reo_cmd_queue_stats(hal_ring_handle_t hal_ring_hdl, cmd->u.stats_params.clear); if (hif_pm_runtime_get(hal_soc->hif_handle, - RTPM_ID_HAL_REO_CMD) == 0) { + RTPM_ID_HAL_REO_CMD, false) == 0) { hal_srng_access_end(hal_soc_hdl, hal_ring_hdl); hif_pm_runtime_put(hal_soc->hif_handle, RTPM_ID_HAL_REO_CMD); @@ -592,7 +592,7 @@ inline int hal_reo_cmd_flush_cache(hal_ring_handle_t hal_ring_hdl, cp->flush_all); if (hif_pm_runtime_get(hal_soc->hif_handle, - RTPM_ID_HAL_REO_CMD) == 0) { + RTPM_ID_HAL_REO_CMD, false) == 0) { hal_srng_access_end(hal_soc_hdl, hal_ring_hdl); hif_pm_runtime_put(hal_soc->hif_handle, RTPM_ID_HAL_REO_CMD); @@ -916,7 +916,7 @@ inline int hal_reo_cmd_update_rx_queue(hal_ring_handle_t hal_ring_hdl, PN_127_96, p->pn_127_96); if (hif_pm_runtime_get(hal_soc->hif_handle, - RTPM_ID_HAL_REO_CMD) == 0) { + RTPM_ID_HAL_REO_CMD, false) == 0) { hal_srng_access_end(hal_soc_hdl, hal_ring_hdl); hif_pm_runtime_put(hal_soc->hif_handle, RTPM_ID_HAL_REO_CMD); diff --git a/hif/inc/hif.h b/hif/inc/hif.h index 3d946ea7f3..76f69f71a8 100644 --- a/hif/inc/hif.h +++ b/hif/inc/hif.h @@ -1031,7 +1031,8 @@ int hif_pm_runtime_put_sync_suspend(struct hif_opaque_softc *hif_ctx, wlan_rtpm_dbgid rtpm_dbgid); int hif_pm_runtime_request_resume(struct hif_opaque_softc *hif_ctx); int hif_pm_runtime_get(struct hif_opaque_softc *hif_ctx, - wlan_rtpm_dbgid rtpm_dbgid); + wlan_rtpm_dbgid rtpm_dbgid, + bool is_critical_ctx); void hif_pm_runtime_get_noresume(struct hif_opaque_softc *hif_ctx, wlan_rtpm_dbgid rtpm_dbgid); int hif_pm_runtime_put(struct hif_opaque_softc *hif_ctx, @@ -1079,7 +1080,8 @@ hif_pm_runtime_get_noresume(struct hif_opaque_softc *hif_ctx, {} static inline int -hif_pm_runtime_get(struct hif_opaque_softc *hif_ctx, wlan_rtpm_dbgid rtpm_dbgid) +hif_pm_runtime_get(struct hif_opaque_softc *hif_ctx, wlan_rtpm_dbgid rtpm_dbgid, + bool is_critical_ctx) { return 0; } static inline int hif_pm_runtime_put(struct hif_opaque_softc *hif_ctx, wlan_rtpm_dbgid rtpm_dbgid) diff --git a/hif/src/ce/ce_service_legacy.c b/hif/src/ce/ce_service_legacy.c index 7d4ad4223d..22929fff13 100644 --- a/hif/src/ce/ce_service_legacy.c +++ b/hif/src/ce/ce_service_legacy.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -148,7 +148,7 @@ int ce_send_fast(struct CE_handle *copyeng, qdf_nbuf_t msdu, * sure there is no PCIe link access. */ if (hif_pm_runtime_get(hif_hdl, - RTPM_ID_CE_SEND_FAST) != 0) + RTPM_ID_CE_SEND_FAST, false) != 0) ok_to_send = false; if (ok_to_send) { diff --git a/hif/src/hif_runtime_pm.c b/hif/src/hif_runtime_pm.c index 295470baac..f3068437e9 100644 --- a/hif/src/hif_runtime_pm.c +++ b/hif/src/hif_runtime_pm.c @@ -1150,6 +1150,8 @@ void hif_pm_runtime_get_noresume(struct hif_opaque_softc *hif_ctx, * hif_pm_runtime_get() - do a get opperation on the device * @hif_ctx: pointer of HIF context * @rtpm_dbgid: dbgid to trace who use it + * @is_critical_ctx: Indication if this function called via a + * critical context * * A get opperation will prevent a runtime suspend until a * corresponding put is done. This api should be used when sending @@ -1162,7 +1164,8 @@ void hif_pm_runtime_get_noresume(struct hif_opaque_softc *hif_ctx, * otherwise an error code. */ int hif_pm_runtime_get(struct hif_opaque_softc *hif_ctx, - wlan_rtpm_dbgid rtpm_dbgid) + wlan_rtpm_dbgid rtpm_dbgid, + bool is_critical_ctx) { struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx); struct hif_runtime_pm_ctx *rpm_ctx; @@ -1207,8 +1210,11 @@ int hif_pm_runtime_get(struct hif_opaque_softc *hif_ctx, if (pm_state == HIF_PM_RUNTIME_STATE_SUSPENDED || pm_state == HIF_PM_RUNTIME_STATE_SUSPENDING) { - hif_info_high("Runtime PM resume is requested by %ps", - (void *)_RET_IP_); + /* Do not log in performance path */ + if (!is_critical_ctx) { + hif_info_high("Runtime PM resume is requested by %ps", + (void *)_RET_IP_); + } ret = -EAGAIN; } else { ret = -EBUSY; diff --git a/htc/htc.c b/htc/htc.c index c1a3677ced..96b2720e64 100644 --- a/htc/htc.c +++ b/htc/htc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1174,7 +1174,7 @@ int htc_pm_runtime_get(HTC_HANDLE htc_handle) HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(htc_handle); return hif_pm_runtime_get(target->hif_dev, - RTPM_ID_HTC); + RTPM_ID_HTC, false); } int htc_pm_runtime_put(HTC_HANDLE htc_handle) diff --git a/htc/htc_send.c b/htc/htc_send.c index c182956475..0f3436937a 100644 --- a/htc/htc_send.c +++ b/htc/htc_send.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1103,7 +1103,7 @@ static void get_htc_send_packets_credit_based(HTC_TARGET *target, htc_send_pkts_rtpm_dbgid_get( pEndpoint->service_id); ret = hif_pm_runtime_get(target->hif_dev, - rtpm_dbgid); + rtpm_dbgid, false); if (ret) { /* bus suspended, runtime resume issued */ QDF_ASSERT(HTC_PACKET_QUEUE_DEPTH(pQueue) == 0); @@ -1252,7 +1252,7 @@ static void get_htc_send_packets(HTC_TARGET *target, htc_send_pkts_rtpm_dbgid_get( pEndpoint->service_id); ret = hif_pm_runtime_get(target->hif_dev, - rtpm_dbgid); + rtpm_dbgid, false); if (ret) { /* bus suspended, runtime resume issued */ QDF_ASSERT(HTC_PACKET_QUEUE_DEPTH(pQueue) == 0); @@ -1932,7 +1932,7 @@ QDF_STATUS htc_send_data_pkt(HTC_HANDLE htc_hdl, qdf_nbuf_t netbuf, int ep_id, rtpm_dbgid = htc_send_pkts_rtpm_dbgid_get(pEndpoint->service_id); - if (hif_pm_runtime_get(target->hif_dev, rtpm_dbgid)) + if (hif_pm_runtime_get(target->hif_dev, rtpm_dbgid, false)) return QDF_STATUS_E_FAILURE; p_htc_hdr = (HTC_FRAME_HDR *)qdf_nbuf_get_frag_vaddr(netbuf, 0); diff --git a/qdf/linux/src/qdf_lock.c b/qdf/linux/src/qdf_lock.c index a900d8623b..f18342b7a2 100644 --- a/qdf/linux/src/qdf_lock.c +++ b/qdf/linux/src/qdf_lock.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -499,7 +499,7 @@ QDF_STATUS qdf_runtime_pm_get(void) return QDF_STATUS_E_INVAL; } - ret = hif_pm_runtime_get(ol_sc, RTPM_ID_RESVERD); + ret = hif_pm_runtime_get(ol_sc, RTPM_ID_RESVERD, false); if (ret) return QDF_STATUS_E_FAILURE;