diff options
author | Deepak Goyal <dgoyal@nvidia.com> | 2018-02-28 06:09:57 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-06 00:18:20 -0500 |
commit | 26b91946031a88293c7ce563ff923802af6509ce (patch) | |
tree | 9b7ad56e7feb381b903f0c07a988114cdec0302f /drivers/gpu/nvgpu/common | |
parent | 848af2ce6de6140323a6ffe3075bf8021e119434 (diff) |
gpu: nvgpu: gv11b: Correct PMU PG enabled masks.
PMU ucode records supported feature list for a
particular chip as support mask sent
via PMU_PG_PARAM_CMD_GR_INIT_PARAM.
It then enables selective feature list through
enable mask sent via
PMU_PG_PARAM_CMD_SUB_FEATURE_MASK_UPDATE cmd.
Right now only ELPG state machine mask was enabled.
Only ELPG state machine was getting executed
but other crucial steps in ELPG entry/exit sequence
were getting skipped.
Bug 200392620.
Bug 200296076.
Change-Id: I5e1800980990c146c731537290cb7d4c07e937c3
Signed-off-by: Deepak Goyal <dgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1665767
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')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/debug_pmu.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/sysfs.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/pmu/pmu_pg.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/debug_pmu.c b/drivers/gpu/nvgpu/common/linux/debug_pmu.c index a8a8870e..f4ed992d 100644 --- a/drivers/gpu/nvgpu/common/linux/debug_pmu.c +++ b/drivers/gpu/nvgpu/common/linux/debug_pmu.c | |||
@@ -27,7 +27,7 @@ static int lpwr_debug_show(struct seq_file *s, void *data) | |||
27 | if (g->ops.pmu.pmu_pg_engines_feature_list && | 27 | if (g->ops.pmu.pmu_pg_engines_feature_list && |
28 | g->ops.pmu.pmu_pg_engines_feature_list(g, | 28 | g->ops.pmu.pmu_pg_engines_feature_list(g, |
29 | PMU_PG_ELPG_ENGINE_ID_GRAPHICS) != | 29 | PMU_PG_ELPG_ENGINE_ID_GRAPHICS) != |
30 | PMU_PG_FEATURE_GR_POWER_GATING_ENABLED) { | 30 | NVGPU_PMU_GR_FEATURE_MASK_POWER_GATING) { |
31 | seq_printf(s, "PSTATE: %u\n" | 31 | seq_printf(s, "PSTATE: %u\n" |
32 | "RPPG Enabled: %u\n" | 32 | "RPPG Enabled: %u\n" |
33 | "RPPG ref count: %u\n" | 33 | "RPPG ref count: %u\n" |
diff --git a/drivers/gpu/nvgpu/common/linux/sysfs.c b/drivers/gpu/nvgpu/common/linux/sysfs.c index 86f1877d..afa08fc4 100644 --- a/drivers/gpu/nvgpu/common/linux/sysfs.c +++ b/drivers/gpu/nvgpu/common/linux/sysfs.c | |||
@@ -477,7 +477,7 @@ static ssize_t elpg_enable_store(struct device *dev, | |||
477 | if (g->ops.pmu.pmu_pg_engines_feature_list && | 477 | if (g->ops.pmu.pmu_pg_engines_feature_list && |
478 | g->ops.pmu.pmu_pg_engines_feature_list(g, | 478 | g->ops.pmu.pmu_pg_engines_feature_list(g, |
479 | PMU_PG_ELPG_ENGINE_ID_GRAPHICS) != | 479 | PMU_PG_ELPG_ENGINE_ID_GRAPHICS) != |
480 | PMU_PG_FEATURE_GR_POWER_GATING_ENABLED) { | 480 | NVGPU_PMU_GR_FEATURE_MASK_POWER_GATING) { |
481 | nvgpu_pmu_pg_global_enable(g, false); | 481 | nvgpu_pmu_pg_global_enable(g, false); |
482 | g->elpg_enabled = false; | 482 | g->elpg_enabled = false; |
483 | } else { | 483 | } else { |
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_pg.c b/drivers/gpu/nvgpu/common/pmu/pmu_pg.c index bf39ce19..2d0fc499 100644 --- a/drivers/gpu/nvgpu/common/pmu/pmu_pg.c +++ b/drivers/gpu/nvgpu/common/pmu/pmu_pg.c | |||
@@ -89,7 +89,7 @@ static void pmu_handle_pg_elpg_msg(struct gk20a *g, struct pmu_msg *msg, | |||
89 | if (g->ops.pmu.pmu_pg_engines_feature_list && | 89 | if (g->ops.pmu.pmu_pg_engines_feature_list && |
90 | g->ops.pmu.pmu_pg_engines_feature_list(g, | 90 | g->ops.pmu.pmu_pg_engines_feature_list(g, |
91 | PMU_PG_ELPG_ENGINE_ID_GRAPHICS) != | 91 | PMU_PG_ELPG_ENGINE_ID_GRAPHICS) != |
92 | PMU_PG_FEATURE_GR_POWER_GATING_ENABLED) { | 92 | NVGPU_PMU_GR_FEATURE_MASK_POWER_GATING) { |
93 | pmu->initialized = true; | 93 | pmu->initialized = true; |
94 | nvgpu_pmu_state_change(g, PMU_STATE_STARTED, | 94 | nvgpu_pmu_state_change(g, PMU_STATE_STARTED, |
95 | true); | 95 | true); |
@@ -116,7 +116,7 @@ int nvgpu_pmu_pg_global_enable(struct gk20a *g, u32 enable_pg) | |||
116 | if (g->ops.pmu.pmu_pg_engines_feature_list && | 116 | if (g->ops.pmu.pmu_pg_engines_feature_list && |
117 | g->ops.pmu.pmu_pg_engines_feature_list(g, | 117 | g->ops.pmu.pmu_pg_engines_feature_list(g, |
118 | PMU_PG_ELPG_ENGINE_ID_GRAPHICS) != | 118 | PMU_PG_ELPG_ENGINE_ID_GRAPHICS) != |
119 | PMU_PG_FEATURE_GR_POWER_GATING_ENABLED) { | 119 | NVGPU_PMU_GR_FEATURE_MASK_POWER_GATING) { |
120 | if (g->ops.pmu.pmu_lpwr_enable_pg) | 120 | if (g->ops.pmu.pmu_lpwr_enable_pg) |
121 | status = g->ops.pmu.pmu_lpwr_enable_pg(g, | 121 | status = g->ops.pmu.pmu_lpwr_enable_pg(g, |
122 | true); | 122 | true); |
@@ -126,7 +126,7 @@ int nvgpu_pmu_pg_global_enable(struct gk20a *g, u32 enable_pg) | |||
126 | if (g->ops.pmu.pmu_pg_engines_feature_list && | 126 | if (g->ops.pmu.pmu_pg_engines_feature_list && |
127 | g->ops.pmu.pmu_pg_engines_feature_list(g, | 127 | g->ops.pmu.pmu_pg_engines_feature_list(g, |
128 | PMU_PG_ELPG_ENGINE_ID_GRAPHICS) != | 128 | PMU_PG_ELPG_ENGINE_ID_GRAPHICS) != |
129 | PMU_PG_FEATURE_GR_POWER_GATING_ENABLED) { | 129 | NVGPU_PMU_GR_FEATURE_MASK_POWER_GATING) { |
130 | if (g->ops.pmu.pmu_lpwr_disable_pg) | 130 | if (g->ops.pmu.pmu_lpwr_disable_pg) |
131 | status = g->ops.pmu.pmu_lpwr_disable_pg(g, | 131 | status = g->ops.pmu.pmu_lpwr_disable_pg(g, |
132 | true); | 132 | true); |