diff options
author | Deepak Goyal <dgoyal@nvidia.com> | 2017-07-01 22:49:29 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-06 08:44:32 -0400 |
commit | 75d7d6826dea130d5eb5ac86f1ca54bd9b05fbe1 (patch) | |
tree | 3a309b2d70caca4f73b78c73ad380d07c5d11ac2 /drivers/gpu/nvgpu/common/pmu/pmu_ipc.c | |
parent | 4166fc2f87ca4254b5e0c1433c810a83676d029a (diff) |
gpu: nvgpu: pmu: check before initializing perfmon
We should check if perfmon is enabled before sending
perfmon init command. This is needed for debug purposes.
Change-Id: Ia95a590a76074c469b5d87a5820cd5b2e50d13be
Signed-off-by: Deepak Goyal <dgoyal@nvidia.com>
Reviewed-on: https://git-master/r/1510036
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/pmu/pmu_ipc.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/pmu/pmu_ipc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c b/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c index 352e525f..0dbc2df3 100644 --- a/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c +++ b/drivers/gpu/nvgpu/common/pmu/pmu_ipc.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * more details. | 11 | * more details. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <nvgpu/enabled.h> | ||
14 | #include <nvgpu/pmu.h> | 15 | #include <nvgpu/pmu.h> |
15 | #include <nvgpu/log.h> | 16 | #include <nvgpu/log.h> |
16 | #include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> | 17 | #include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> |
@@ -844,7 +845,8 @@ int nvgpu_pmu_process_message(struct nvgpu_pmu *pmu) | |||
844 | nvgpu_pmu_process_init_msg(pmu, &msg); | 845 | nvgpu_pmu_process_init_msg(pmu, &msg); |
845 | if (g->ops.pmu.init_wpr_region != NULL) | 846 | if (g->ops.pmu.init_wpr_region != NULL) |
846 | g->ops.pmu.init_wpr_region(g); | 847 | g->ops.pmu.init_wpr_region(g); |
847 | nvgpu_pmu_init_perfmon(pmu); | 848 | if (nvgpu_is_enabled(g, NVGPU_PMU_PERFMON)) |
849 | nvgpu_pmu_init_perfmon(pmu); | ||
848 | 850 | ||
849 | return 0; | 851 | return 0; |
850 | } | 852 | } |