diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2016-11-14 09:22:50 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-01-10 12:24:06 -0500 |
commit | f3e0dba8bfb20489f23c93a16bc5bd337206705f (patch) | |
tree | a341f26b68ad6ec2f7994ee26852c551af32d311 /drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |
parent | e239ce69b38a9a557ed466a3bd9b090916f6cd31 (diff) |
gpu: nvgpu: pg stat read update
- Added struct pmu_pg_stats_data to extract
data from multiple version of pmu pg statistics
- Added pmu_pg_stats_v2 interface to fetch
PG statistics data from PMU
- Added MSCG debugfs node to read mscg
statistics from PMU.
- Added pmu_elpg_statistics HAL support for
gp106 PG statistics read.
- Made changes to gp104/gp106
pmu_elpg_statistics HAL to support
for struct pmu_pg_stats_data
JIRA DNVGPU-165
Change-Id: I2b9e89c0fae90deb45006c4478170b9a97b56603
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/1252798
(cherry picked from commit 3c073b15fd991db8d65b3171b02c161294be40cd)
Reviewed-on: http://git-master/r/1271615
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h index 32e2ef54..d7ab928b 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * GK20A PMU (aka. gPMU outside gk20a context) | 4 | * GK20A PMU (aka. gPMU outside gk20a context) |
5 | * | 5 | * |
6 | * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. | 6 | * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms and conditions of the GNU General Public License, | 9 | * under the terms and conditions of the GNU General Public License, |
@@ -566,6 +566,33 @@ struct pmu_sequence { | |||
566 | void* cb_params; | 566 | void* cb_params; |
567 | }; | 567 | }; |
568 | 568 | ||
569 | struct pmu_pg_stats_data { | ||
570 | u32 gating_cnt; | ||
571 | u32 ingating_time; | ||
572 | u32 ungating_time; | ||
573 | u32 avg_entry_latency_us; | ||
574 | u32 avg_exit_latency_us; | ||
575 | }; | ||
576 | |||
577 | struct pmu_pg_stats_v2 { | ||
578 | u32 entry_count; | ||
579 | u32 exit_count; | ||
580 | u32 abort_count; | ||
581 | u32 detection_count; | ||
582 | u32 prevention_activate_count; | ||
583 | u32 prevention_deactivate_count; | ||
584 | u32 powered_up_time_us; | ||
585 | u32 entry_latency_us; | ||
586 | u32 exit_latency_us; | ||
587 | u32 resident_time_us; | ||
588 | u32 entry_latency_avg_us; | ||
589 | u32 exit_latency_avg_us; | ||
590 | u32 entry_latency_max_us; | ||
591 | u32 exit_latency_max_us; | ||
592 | u32 total_sleep_time_us; | ||
593 | u32 total_non_sleep_time_us; | ||
594 | }; | ||
595 | |||
569 | struct pmu_pg_stats_v1 { | 596 | struct pmu_pg_stats_v1 { |
570 | /* Number of time PMU successfully engaged sleep state */ | 597 | /* Number of time PMU successfully engaged sleep state */ |
571 | u32 entry_count; | 598 | u32 entry_count; |
@@ -825,7 +852,7 @@ int pmu_wait_message_cond(struct pmu_gk20a *pmu, u32 timeout_ms, | |||
825 | void pmu_handle_fecs_boot_acr_msg(struct gk20a *g, struct pmu_msg *msg, | 852 | void pmu_handle_fecs_boot_acr_msg(struct gk20a *g, struct pmu_msg *msg, |
826 | void *param, u32 handle, u32 status); | 853 | void *param, u32 handle, u32 status); |
827 | void gk20a_pmu_elpg_statistics(struct gk20a *g, u32 pg_engine_id, | 854 | void gk20a_pmu_elpg_statistics(struct gk20a *g, u32 pg_engine_id, |
828 | u32 *ingating_time, u32 *ungating_time, u32 *gating_cnt); | 855 | struct pmu_pg_stats_data *pg_stat_data); |
829 | int gk20a_pmu_reset(struct gk20a *g); | 856 | int gk20a_pmu_reset(struct gk20a *g); |
830 | int pmu_idle(struct pmu_gk20a *pmu); | 857 | int pmu_idle(struct pmu_gk20a *pmu); |
831 | int pmu_enable_hw(struct pmu_gk20a *pmu, bool enable); | 858 | int pmu_enable_hw(struct pmu_gk20a *pmu, bool enable); |