summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorMahantesh Kumbar <mkumbar@nvidia.com>2017-06-13 05:51:56 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-06-15 14:18:51 -0400
commit77e2cbab237637f71367df25384164b8c936a31a (patch)
tree64ccc10c4c6aa3eddbcac1d697d50b860247bf57 /drivers/gpu/nvgpu/include
parent7d16f7e52c0f8ce8604e992a617a3f98545fcf07 (diff)
gpu: nvgpu: reorganize PMU perfmon
-Moved perfmon code from pmu_gk20a.c to "drivers/gpu/nvgpu/common/pmu/pmu_perfmon.c" file -Moved below related methods perfmon init, start/stop sampling, load counter read/write/reset, perfmon event handler - prepend with nvgpu_ for perfmon global methods by replacing gk20a_ JURA NVGPU-56 JURA NVGPU-98 Change-Id: Idbcdf63ebd76da170e609cc401b320a42110cd7b Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: http://git-master/r/1501418 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/pmu.h10
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmu.h b/drivers/gpu/nvgpu/include/nvgpu/pmu.h
index c4972f67..ede238a0 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/pmu.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/pmu.h
@@ -392,8 +392,16 @@ int nvgpu_pmu_process_message(struct nvgpu_pmu *pmu);
392 392
393/* perfmon */ 393/* perfmon */
394int nvgpu_pmu_init_perfmon(struct nvgpu_pmu *pmu); 394int nvgpu_pmu_init_perfmon(struct nvgpu_pmu *pmu);
395int nvgpu_pmu_perfmon_start_sampling(struct nvgpu_pmu *pmu);
396int nvgpu_pmu_perfmon_stop_sampling(struct nvgpu_pmu *pmu);
395int nvgpu_pmu_handle_perfmon_event(struct nvgpu_pmu *pmu, 397int nvgpu_pmu_handle_perfmon_event(struct nvgpu_pmu *pmu,
396 struct pmu_perfmon_msg *msg); 398 struct pmu_perfmon_msg *msg);
399int nvgpu_pmu_load_norm(struct gk20a *g, u32 *load);
400int nvgpu_pmu_load_update(struct gk20a *g);
401void nvgpu_pmu_reset_load_counters(struct gk20a *g);
402void nvgpu_pmu_get_load_counters(struct gk20a *g, u32 *busy_cycles,
403 u32 *total_cycles);
404
397int nvgpu_pmu_handle_therm_event(struct nvgpu_pmu *pmu, 405int nvgpu_pmu_handle_therm_event(struct nvgpu_pmu *pmu,
398 struct nv_pmu_therm_msg *msg); 406 struct nv_pmu_therm_msg *msg);
399 407
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h b/drivers/gpu/nvgpu/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h
index 01cd2743..310cb508 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/pmuif/nvgpu_gpmu_cmdif.h
@@ -78,6 +78,7 @@ struct pmu_msg {
78#define PMU_UNIT_VOLT (0x0E) 78#define PMU_UNIT_VOLT (0x0E)
79 79
80#define PMU_UNIT_END (0x23) 80#define PMU_UNIT_END (0x23)
81#define PMU_UNIT_INVALID (0xFF)
81 82
82#define PMU_UNIT_TEST_START (0xFE) 83#define PMU_UNIT_TEST_START (0xFE)
83#define PMU_UNIT_END_SIM (0xFF) 84#define PMU_UNIT_END_SIM (0xFF)