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/gp10b | |
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/gp10b')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/pmu_gp10b.c | 14 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/pmu_gp10b.h | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/pmu_gp10b.c b/drivers/gpu/nvgpu/gp10b/pmu_gp10b.c index 12337934..cf702ac6 100644 --- a/drivers/gpu/nvgpu/gp10b/pmu_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/pmu_gp10b.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GP10B PMU | 2 | * GP10B PMU |
3 | * | 3 | * |
4 | * Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -250,8 +250,8 @@ int gp10b_pg_gr_init(struct gk20a *g, u32 pg_engine_id) | |||
250 | return 0; | 250 | return 0; |
251 | } | 251 | } |
252 | 252 | ||
253 | void gp10b_pmu_elpg_statistics(struct gk20a *g, u32 pg_engine_id, | 253 | static void gp10b_pmu_elpg_statistics(struct gk20a *g, u32 pg_engine_id, |
254 | u32 *ingating_time, u32 *ungating_time, u32 *gating_cnt) | 254 | struct pmu_pg_stats_data *pg_stat_data) |
255 | { | 255 | { |
256 | struct pmu_gk20a *pmu = &g->pmu; | 256 | struct pmu_gk20a *pmu = &g->pmu; |
257 | struct pmu_pg_stats_v1 stats; | 257 | struct pmu_pg_stats_v1 stats; |
@@ -260,9 +260,11 @@ void gp10b_pmu_elpg_statistics(struct gk20a *g, u32 pg_engine_id, | |||
260 | pmu->stat_dmem_offset[pg_engine_id], | 260 | pmu->stat_dmem_offset[pg_engine_id], |
261 | (u8 *)&stats, sizeof(struct pmu_pg_stats_v1), 0); | 261 | (u8 *)&stats, sizeof(struct pmu_pg_stats_v1), 0); |
262 | 262 | ||
263 | *ingating_time = stats.total_sleep_timeus; | 263 | pg_stat_data->ingating_time = stats.total_sleep_timeus; |
264 | *ungating_time = stats.total_nonsleep_timeus; | 264 | pg_stat_data->ungating_time = stats.total_nonsleep_timeus; |
265 | *gating_cnt = stats.entry_count; | 265 | pg_stat_data->gating_cnt = stats.entry_count; |
266 | pg_stat_data->avg_entry_latency_us = stats.entrylatency_avgus; | ||
267 | pg_stat_data->avg_exit_latency_us = stats.exitlatency_avgus; | ||
266 | } | 268 | } |
267 | 269 | ||
268 | static int gp10b_pmu_setup_elpg(struct gk20a *g) | 270 | static int gp10b_pmu_setup_elpg(struct gk20a *g) |
diff --git a/drivers/gpu/nvgpu/gp10b/pmu_gp10b.h b/drivers/gpu/nvgpu/gp10b/pmu_gp10b.h index c9ac9d41..9fc6228d 100644 --- a/drivers/gpu/nvgpu/gp10b/pmu_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/pmu_gp10b.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GP10B PMU | 2 | * GP10B PMU |
3 | * | 3 | * |
4 | * Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -20,7 +20,5 @@ void gp10b_init_pmu_ops(struct gpu_ops *gops); | |||
20 | int gp10b_load_falcon_ucode(struct gk20a *g, u32 falconidmask); | 20 | int gp10b_load_falcon_ucode(struct gk20a *g, u32 falconidmask); |
21 | int gp10b_pg_gr_init(struct gk20a *g, u32 pg_engine_id); | 21 | int gp10b_pg_gr_init(struct gk20a *g, u32 pg_engine_id); |
22 | void gp10b_write_dmatrfbase(struct gk20a *g, u32 addr); | 22 | void gp10b_write_dmatrfbase(struct gk20a *g, u32 addr); |
23 | void gp10b_pmu_elpg_statistics(struct gk20a *g, u32 pg_engine_id, | ||
24 | u32 *ingating_time, u32 *ungating_time, u32 *gating_cnt); | ||
25 | 23 | ||
26 | #endif /*__PMU_GP10B_H_*/ | 24 | #endif /*__PMU_GP10B_H_*/ |