diff options
author | Deepak Goyal <dgoyal@nvidia.com> | 2018-01-18 01:14:47 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-19 02:40:02 -0500 |
commit | e0dbf3a784f6cb1a6e1c41a23123b19ec73b8708 (patch) | |
tree | d089cf84f16980034b82c53f2913bcdda452151d /drivers/gpu/nvgpu/common/linux/vgpu | |
parent | a57258e9b18f2f336457165391572bc477371e94 (diff) |
gpu: nvgpu: gv11b: Enable perfmon.
t19x PMU ucode uses RPC mechanism for
PERFMON commands.
- Declared "pmu_init_perfmon",
"pmu_perfmon_start_sampling",
"pmu_perfmon_stop_sampling" and
"pmu_perfmon_get_samples" in pmu ops
to differenciate for chips using RPC & legacy
cmd/msg mechanism.
- Defined and used PERFMON RPC commands for t19x
- INIT
- START
- STOP
- QUERY
- Adds RPC handler for PERFMON RPC commands.
- For guerying GPU utilization/load, we need to send PERFMON_QUERY
RPC command for gv11b.
- Enables perfmon for gv11b.
Bug 2039013
Change-Id: Ic32326f81d48f11bc772afb8fee2dee6e427a699
Signed-off-by: Deepak Goyal <dgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1614114
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_hal_gp10b.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_hal_gp10b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_hal_gp10b.c index d5fd5102..3f99eb9e 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_hal_gp10b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gp10b/vgpu_hal_gp10b.c | |||
@@ -417,6 +417,9 @@ static const struct gpu_ops vgpu_gp10b_ops = { | |||
417 | .pmu_mutex_release = gk20a_pmu_mutex_release, | 417 | .pmu_mutex_release = gk20a_pmu_mutex_release, |
418 | .write_dmatrfbase = gp10b_write_dmatrfbase, | 418 | .write_dmatrfbase = gp10b_write_dmatrfbase, |
419 | .pmu_elpg_statistics = gp10b_pmu_elpg_statistics, | 419 | .pmu_elpg_statistics = gp10b_pmu_elpg_statistics, |
420 | .pmu_init_perfmon = nvgpu_pmu_init_perfmon, | ||
421 | .pmu_perfmon_start_sampling = nvgpu_pmu_perfmon_start_sampling, | ||
422 | .pmu_perfmon_stop_sampling = nvgpu_pmu_perfmon_stop_sampling, | ||
420 | .pmu_pg_init_param = gp10b_pg_gr_init, | 423 | .pmu_pg_init_param = gp10b_pg_gr_init, |
421 | .pmu_pg_supported_engines_list = gk20a_pmu_pg_engines_list, | 424 | .pmu_pg_supported_engines_list = gk20a_pmu_pg_engines_list, |
422 | .pmu_pg_engines_feature_list = gk20a_pmu_pg_feature_list, | 425 | .pmu_pg_engines_feature_list = gk20a_pmu_pg_feature_list, |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c index 132ce6e5..c8752f91 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c | |||
@@ -461,6 +461,10 @@ static const struct gpu_ops vgpu_gv11b_ops = { | |||
461 | .pmu_mutex_release = gk20a_pmu_mutex_release, | 461 | .pmu_mutex_release = gk20a_pmu_mutex_release, |
462 | .write_dmatrfbase = gp10b_write_dmatrfbase, | 462 | .write_dmatrfbase = gp10b_write_dmatrfbase, |
463 | .pmu_elpg_statistics = gp106_pmu_elpg_statistics, | 463 | .pmu_elpg_statistics = gp106_pmu_elpg_statistics, |
464 | .pmu_init_perfmon = nvgpu_pmu_init_perfmon_rpc, | ||
465 | .pmu_perfmon_start_sampling = nvgpu_pmu_perfmon_start_sampling_rpc, | ||
466 | .pmu_perfmon_stop_sampling = nvgpu_pmu_perfmon_stop_sampling_rpc, | ||
467 | .pmu_perfmon_get_samples_rpc = nvgpu_pmu_perfmon_get_samples_rpc, | ||
464 | .pmu_pg_init_param = gv11b_pg_gr_init, | 468 | .pmu_pg_init_param = gv11b_pg_gr_init, |
465 | .pmu_pg_supported_engines_list = gk20a_pmu_pg_engines_list, | 469 | .pmu_pg_supported_engines_list = gk20a_pmu_pg_engines_list, |
466 | .pmu_pg_engines_feature_list = gk20a_pmu_pg_feature_list, | 470 | .pmu_pg_engines_feature_list = gk20a_pmu_pg_feature_list, |