summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/driver_common.c
diff options
context:
space:
mode:
authorDeepak Goyal <dgoyal@nvidia.com>2017-07-01 22:49:29 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-06 08:44:32 -0400
commit75d7d6826dea130d5eb5ac86f1ca54bd9b05fbe1 (patch)
tree3a309b2d70caca4f73b78c73ad380d07c5d11ac2 /drivers/gpu/nvgpu/common/linux/driver_common.c
parent4166fc2f87ca4254b5e0c1433c810a83676d029a (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/linux/driver_common.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/driver_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c
index b12917d6..4e2cb2b4 100644
--- a/drivers/gpu/nvgpu/common/linux/driver_common.c
+++ b/drivers/gpu/nvgpu/common/linux/driver_common.c
@@ -124,6 +124,7 @@ static void nvgpu_init_pm_vars(struct gk20a *g)
124 g->support_pmu = support_gk20a_pmu(dev_from_gk20a(g)); 124 g->support_pmu = support_gk20a_pmu(dev_from_gk20a(g));
125 g->can_railgate = platform->can_railgate_init; 125 g->can_railgate = platform->can_railgate_init;
126 g->railgate_delay = platform->railgate_delay_init; 126 g->railgate_delay = platform->railgate_delay_init;
127 __nvgpu_set_enabled(g, NVGPU_PMU_PERFMON, platform->enable_perfmon);
127 128
128 /* set default values to aelpg parameters */ 129 /* set default values to aelpg parameters */
129 g->pmu.aelpg_param[0] = APCTRL_SAMPLING_PERIOD_PG_DEFAULT_US; 130 g->pmu.aelpg_param[0] = APCTRL_SAMPLING_PERIOD_PG_DEFAULT_US;