mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
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:
parent
f2a6c8c941
commit
8f2c736cdc
4 changed files with 51 additions and 3 deletions
|
|
@ -1104,6 +1104,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,
|
||||
|
|
@ -1112,6 +1120,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
|
||||
|
|
|
|||
|
|
@ -1849,6 +1849,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 */
|
||||
|
|
|
|||
|
|
@ -1339,19 +1339,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;
|
||||
}
|
||||
|
||||
|
|
@ -2573,6 +2584,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];
|
||||
|
||||
|
|
@ -2588,7 +2603,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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue