diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2017-07-11 02:12:01 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-09-25 03:18:59 -0400 |
commit | 350bb74859eb6eb0d0ba7c8e6792a0b4e48849b4 (patch) | |
tree | 3756bbd4d958930a4d999f95b8ef90694e3cf3c1 /drivers/gpu/nvgpu/common/pmu/pmu_debug.c | |
parent | b5556c74905974b0b19defb775f7301a341982a0 (diff) |
gpu: nvgpu: PMU debug reorg
- Moved PMU debug related code to pmu_debug.c
Print pmu trace buffer
Moved PMU controller/engine status dump debug code
Moved ELPG stats dump code
- Removed PMU falcon controller status dump code & used
nvgpu_flcn_dump_stats() method,
- Method to print ELPG stats.
- PMU HAL to print PMU engine & ELPG debug info upon error
NVGPU JIRA-96
Change-Id: Iaa3d983f1d3b78a1b051beb6c109d3da8f8c90bc
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1516640
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/pmu/pmu_debug.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/pmu/pmu_debug.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_debug.c b/drivers/gpu/nvgpu/common/pmu/pmu_debug.c new file mode 100644 index 00000000..744a618d --- /dev/null +++ b/drivers/gpu/nvgpu/common/pmu/pmu_debug.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | */ | ||
13 | |||
14 | #include <nvgpu/pmu.h> | ||
15 | #include <nvgpu/log.h> | ||
16 | #include <nvgpu/timers.h> | ||
17 | #include <nvgpu/kmem.h> | ||
18 | #include <nvgpu/dma.h> | ||
19 | #include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> | ||
20 | |||
21 | #include "gk20a/gk20a.h" | ||
22 | |||
23 | void nvgpu_pmu_dump_elpg_stats(struct nvgpu_pmu *pmu) | ||
24 | { | ||
25 | struct gk20a *g = pmu->g; | ||
26 | |||
27 | /* Print PG stats */ | ||
28 | nvgpu_err(g, "Print PG stats"); | ||
29 | nvgpu_flcn_print_dmem(pmu->flcn, | ||
30 | pmu->stat_dmem_offset[PMU_PG_ELPG_ENGINE_ID_GRAPHICS], | ||
31 | sizeof(struct pmu_pg_stats_v2)); | ||
32 | |||
33 | gk20a_pmu_dump_elpg_stats(pmu); | ||
34 | } | ||
35 | |||
36 | void nvgpu_pmu_dump_falcon_stats(struct nvgpu_pmu *pmu) | ||
37 | { | ||
38 | struct gk20a *g = pmu->g; | ||
39 | |||
40 | nvgpu_flcn_dump_stats(pmu->flcn); | ||
41 | gk20a_pmu_dump_falcon_stats(pmu); | ||
42 | |||
43 | nvgpu_err(g, "pmu state: %d", pmu->pmu_state); | ||
44 | nvgpu_err(g, "elpg state: %d", pmu->elpg_stat); | ||
45 | |||
46 | /* PMU may crash due to FECS crash. Dump FECS status */ | ||
47 | gk20a_fecs_dump_falcon_stats(g); | ||
48 | } | ||