qcacmn: additional runtime PM stats for HTC layer
Add few more stats to the existing runtime PM stats for HTC layer. Change-Id: I1610acc534997b14ae070c48da03b4e07a00d9ef CRs-Fixed: 2949969
This commit is contained in:

کامیت شده توسط
Madan Koyyalamudi

والد
e5a60db99c
کامیت
fe0463deb8
@@ -1110,6 +1110,14 @@ enum hif_pm_link_state {
|
||||
with no response
|
||||
* HIF_PM_HTC_STATS_PUT_HTT_ERROR: PM stats for RTPM PUT for failed HTT packets
|
||||
* HIF_PM_HTC_STATS_PUT_HTC_CLEANUP: PM stats for RTPM PUT during HTC cleanup
|
||||
* HIF_PM_HTC_STATS_GET_HTC_KICK_QUEUES: PM stats for RTPM GET done during
|
||||
* htc_kick_queues()
|
||||
* HIF_PM_HTC_STATS_PUT_HTC_KICK_QUEUES: PM stats for RTPM PUT done during
|
||||
* htc_kick_queues()
|
||||
* HIF_PM_HTC_STATS_GET_HTT_FETCH_PKTS: PM stats for RTPM GET while fetching
|
||||
* HTT packets from endpoint TX queue
|
||||
* HIF_PM_HTC_STATS_PUT_HTT_FETCH_PKTS: PM stats for RTPM PUT while fetching
|
||||
* HTT packets from endpoint TX queue
|
||||
*/
|
||||
enum hif_pm_htc_stats {
|
||||
HIF_PM_HTC_STATS_GET_HTT_RESPONSE,
|
||||
@@ -1118,6 +1126,10 @@ enum hif_pm_htc_stats {
|
||||
HIF_PM_HTC_STATS_PUT_HTT_NO_RESPONSE,
|
||||
HIF_PM_HTC_STATS_PUT_HTT_ERROR,
|
||||
HIF_PM_HTC_STATS_PUT_HTC_CLEANUP,
|
||||
HIF_PM_HTC_STATS_GET_HTC_KICK_QUEUES,
|
||||
HIF_PM_HTC_STATS_PUT_HTC_KICK_QUEUES,
|
||||
HIF_PM_HTC_STATS_GET_HTT_FETCH_PKTS,
|
||||
HIF_PM_HTC_STATS_PUT_HTT_FETCH_PKTS,
|
||||
};
|
||||
|
||||
#ifdef FEATURE_RUNTIME_PM
|
||||
|
@@ -1854,6 +1854,18 @@ void hif_pm_runtime_update_stats(struct hif_opaque_softc *hif_ctx,
|
||||
case HIF_PM_HTC_STATS_PUT_HTC_CLEANUP:
|
||||
rpm_ctx->pm_stats.pm_stats_htc.rtpm_put_htc_cleanup++;
|
||||
break;
|
||||
case HIF_PM_HTC_STATS_GET_HTC_KICK_QUEUES:
|
||||
rpm_ctx->pm_stats.pm_stats_htc.rtpm_get_htc_kick_queues++;
|
||||
break;
|
||||
case HIF_PM_HTC_STATS_PUT_HTC_KICK_QUEUES:
|
||||
rpm_ctx->pm_stats.pm_stats_htc.rtpm_put_htc_kick_queues++;
|
||||
break;
|
||||
case HIF_PM_HTC_STATS_GET_HTT_FETCH_PKTS:
|
||||
rpm_ctx->pm_stats.pm_stats_htc.rtpm_get_htt_fetch_pkts++;
|
||||
break;
|
||||
case HIF_PM_HTC_STATS_PUT_HTT_FETCH_PKTS:
|
||||
rpm_ctx->pm_stats.pm_stats_htc.rtpm_put_htt_fetch_pkts++;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -56,6 +56,10 @@ struct hif_pm_runtime_htc_stats {
|
||||
uint32_t rtpm_put_htt_no_resp;
|
||||
uint32_t rtpm_put_htt_error;
|
||||
uint32_t rtpm_put_htc_cleanup;
|
||||
uint32_t rtpm_get_htc_kick_queues;
|
||||
uint32_t rtpm_put_htc_kick_queues;
|
||||
uint32_t rtpm_get_htt_fetch_pkts;
|
||||
uint32_t rtpm_put_htt_fetch_pkts;
|
||||
};
|
||||
|
||||
/* Debugging stats for Runtime PM */
|
||||
|
@@ -1340,19 +1340,30 @@ static void get_htc_send_packets(HTC_TARGET *target,
|
||||
}
|
||||
break;
|
||||
}
|
||||
hif_pm_runtime_update_stats(
|
||||
target->hif_dev, rtpm_dbgid,
|
||||
HIF_PM_HTC_STATS_GET_HTT_FETCH_PKTS);
|
||||
}
|
||||
|
||||
ret = hif_system_pm_state_check(target->hif_dev);
|
||||
if (ret) {
|
||||
if (do_pm_get)
|
||||
if (do_pm_get) {
|
||||
hif_pm_runtime_put(target->hif_dev, rtpm_dbgid);
|
||||
hif_pm_runtime_update_stats(
|
||||
target->hif_dev, rtpm_dbgid,
|
||||
HIF_PM_HTC_STATS_PUT_HTT_FETCH_PKTS);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
pPacket = htc_packet_dequeue(tx_queue);
|
||||
if (!pPacket) {
|
||||
if (do_pm_get)
|
||||
if (do_pm_get) {
|
||||
hif_pm_runtime_put(target->hif_dev, rtpm_dbgid);
|
||||
hif_pm_runtime_update_stats(
|
||||
target->hif_dev, rtpm_dbgid,
|
||||
HIF_PM_HTC_STATS_PUT_HTT_FETCH_PKTS);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2577,6 +2588,10 @@ void htc_kick_queues(void *context)
|
||||
if (hif_pm_runtime_get_sync(target->hif_dev, RTPM_ID_HTC))
|
||||
return;
|
||||
|
||||
hif_pm_runtime_update_stats(
|
||||
target->hif_dev, RTPM_ID_HTC,
|
||||
HIF_PM_HTC_STATS_GET_HTC_KICK_QUEUES);
|
||||
|
||||
for (i = 0; i < ENDPOINT_MAX; i++) {
|
||||
endpoint = &target->endpoint[i];
|
||||
|
||||
@@ -2592,7 +2607,12 @@ void htc_kick_queues(void *context)
|
||||
|
||||
hif_fastpath_resume(target->hif_dev);
|
||||
|
||||
hif_pm_runtime_put(target->hif_dev, RTPM_ID_HTC);
|
||||
if (hif_pm_runtime_put(target->hif_dev, RTPM_ID_HTC))
|
||||
return;
|
||||
|
||||
hif_pm_runtime_update_stats(
|
||||
target->hif_dev, RTPM_ID_HTC,
|
||||
HIF_PM_HTC_STATS_PUT_HTC_KICK_QUEUES);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
مرجع در شماره جدید
Block a user