diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/enabled.h | 1 |
6 files changed, 9 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 32441c5b..21e861fe 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -138,7 +138,7 @@ int gk20a_prepare_poweroff(struct gk20a *g) | |||
138 | ret |= g->ops.clk.suspend_clk_support(g); | 138 | ret |= g->ops.clk.suspend_clk_support(g); |
139 | 139 | ||
140 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC | 140 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC |
141 | if (g->ops.pmupstate) | 141 | if (nvgpu_is_enabled(g, NVGPU_PMU_PSTATE)) |
142 | gk20a_deinit_pstate_support(g); | 142 | gk20a_deinit_pstate_support(g); |
143 | #endif | 143 | #endif |
144 | g->power_on = false; | 144 | g->power_on = false; |
@@ -252,7 +252,7 @@ int gk20a_finalize_poweron(struct gk20a *g) | |||
252 | } | 252 | } |
253 | 253 | ||
254 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC | 254 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC |
255 | if (g->ops.pmupstate) { | 255 | if (nvgpu_is_enabled(g, NVGPU_PMU_PSTATE)) { |
256 | err = gk20a_init_pstate_support(g); | 256 | err = gk20a_init_pstate_support(g); |
257 | if (err) { | 257 | if (err) { |
258 | nvgpu_err(g, "failed to init pstates"); | 258 | nvgpu_err(g, "failed to init pstates"); |
@@ -276,7 +276,7 @@ int gk20a_finalize_poweron(struct gk20a *g) | |||
276 | } | 276 | } |
277 | 277 | ||
278 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC | 278 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC |
279 | if (g->ops.pmupstate) { | 279 | if (nvgpu_is_enabled(g, NVGPU_PMU_PSTATE)) { |
280 | err = gk20a_init_pstate_pmu_support(g); | 280 | err = gk20a_init_pstate_pmu_support(g); |
281 | if (err) { | 281 | if (err) { |
282 | nvgpu_err(g, "failed to init pstates"); | 282 | nvgpu_err(g, "failed to init pstates"); |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index ff8eb988..17a06099 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -994,7 +994,6 @@ struct gpu_ops { | |||
994 | } priv_ring; | 994 | } priv_ring; |
995 | bool privsecurity; | 995 | bool privsecurity; |
996 | bool securegpccs; | 996 | bool securegpccs; |
997 | bool pmupstate; | ||
998 | }; | 997 | }; |
999 | 998 | ||
1000 | struct nvgpu_bios_ucode { | 999 | struct nvgpu_bios_ucode { |
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index bdee1149..7415e6c1 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c | |||
@@ -352,7 +352,7 @@ int gm20b_init_hal(struct gk20a *g) | |||
352 | gops->get_litter_value = gm20b_ops.get_litter_value; | 352 | gops->get_litter_value = gm20b_ops.get_litter_value; |
353 | 353 | ||
354 | gops->securegpccs = false; | 354 | gops->securegpccs = false; |
355 | gops->pmupstate = false; | 355 | __nvgpu_set_enabled(g, NVGPU_PMU_PSTATE, false); |
356 | #ifdef CONFIG_TEGRA_ACR | 356 | #ifdef CONFIG_TEGRA_ACR |
357 | if (nvgpu_is_enabled(g, NVGPU_IS_FMODEL)) { | 357 | if (nvgpu_is_enabled(g, NVGPU_IS_FMODEL)) { |
358 | gops->privsecurity = 1; | 358 | gops->privsecurity = 1; |
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index fa767c3b..2a661734 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -62,6 +62,7 @@ | |||
62 | #include <nvgpu/debug.h> | 62 | #include <nvgpu/debug.h> |
63 | #include <nvgpu/bug.h> | 63 | #include <nvgpu/bug.h> |
64 | #include <nvgpu/bus.h> | 64 | #include <nvgpu/bus.h> |
65 | #include <nvgpu/enabled.h> | ||
65 | 66 | ||
66 | #include <nvgpu/hw/gp106/hw_proj_gp106.h> | 67 | #include <nvgpu/hw/gp106/hw_proj_gp106.h> |
67 | #include <nvgpu/hw/gp106/hw_fifo_gp106.h> | 68 | #include <nvgpu/hw/gp106/hw_fifo_gp106.h> |
@@ -417,8 +418,7 @@ int gp106_init_hal(struct gk20a *g) | |||
417 | 418 | ||
418 | gops->privsecurity = 1; | 419 | gops->privsecurity = 1; |
419 | gops->securegpccs = 1; | 420 | gops->securegpccs = 1; |
420 | gops->pmupstate = true; | 421 | __nvgpu_set_enabled(g, NVGPU_PMU_PSTATE, true); |
421 | |||
422 | 422 | ||
423 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; | 423 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; |
424 | gp106_init_gr(gops); | 424 | gp106_init_gr(gops); |
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index d603703b..177a7c9f 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -364,7 +364,8 @@ int gp10b_init_hal(struct gk20a *g) | |||
364 | gp10b_ops.chip_init_gpu_characteristics; | 364 | gp10b_ops.chip_init_gpu_characteristics; |
365 | gops->get_litter_value = gp10b_ops.get_litter_value; | 365 | gops->get_litter_value = gp10b_ops.get_litter_value; |
366 | 366 | ||
367 | gops->pmupstate = false; | 367 | __nvgpu_set_enabled(g, NVGPU_PMU_PSTATE, false); |
368 | |||
368 | #ifdef CONFIG_TEGRA_ACR | 369 | #ifdef CONFIG_TEGRA_ACR |
369 | if (nvgpu_is_enabled(g, NVGPU_IS_FMODEL)) { | 370 | if (nvgpu_is_enabled(g, NVGPU_IS_FMODEL)) { |
370 | gops->privsecurity = 0; | 371 | gops->privsecurity = 0; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index 3bfd4899..6fa7dcfa 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h | |||
@@ -42,6 +42,7 @@ struct gk20a; | |||
42 | */ | 42 | */ |
43 | /* perfmon enabled or disabled for PMU */ | 43 | /* perfmon enabled or disabled for PMU */ |
44 | #define NVGPU_PMU_PERFMON 48 | 44 | #define NVGPU_PMU_PERFMON 48 |
45 | #define NVGPU_PMU_PSTATE 49 | ||
45 | 46 | ||
46 | /* | 47 | /* |
47 | * Must be greater than the largest bit offset in the above list. | 48 | * Must be greater than the largest bit offset in the above list. |