diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2017-06-06 05:56:32 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-12 14:03:37 -0400 |
commit | 69dee6a648ad434b75e1a9c64b022ee45d3ff87b (patch) | |
tree | eba316aa07b17760afb1609b331bb3cf0602e545 /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | 914bb78a7dc0687b349310cc28613ea4a4c0be33 (diff) |
gpu: nvgpu: reorganize PMU init
- Moved PMU init code from pmu_gk20a.c to
"drivers/gpu/nvgpu/common/pmu/pmu.c" file
- Moved below related methods
SW/HW init,
init msg handler,
deinit/destroy,
PMU state machine
-Created HAL methods to read message queue tail
& supported mutex count.
-prepend with nvgpu_ for pmu init global
mehtods
JIRA NVGPU-56
JIRA NVGPU-92
Change-Id: Iea9efc194fefa74fb5641d2b2f4633577d2c3a47
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/1480002
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index b038cd81..8624d601 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <nvgpu/timers.h> | 24 | #include <nvgpu/timers.h> |
25 | #include <nvgpu/soc.h> | 25 | #include <nvgpu/soc.h> |
26 | #include <nvgpu/enabled.h> | 26 | #include <nvgpu/enabled.h> |
27 | #include <nvgpu/pmu.h> | ||
27 | 28 | ||
28 | #include <trace/events/gk20a.h> | 29 | #include <trace/events/gk20a.h> |
29 | 30 | ||
@@ -130,7 +131,7 @@ int gk20a_prepare_poweroff(struct gk20a *g) | |||
130 | 131 | ||
131 | /* disable elpg before gr or fifo suspend */ | 132 | /* disable elpg before gr or fifo suspend */ |
132 | if (g->ops.pmu.is_pmu_supported(g)) | 133 | if (g->ops.pmu.is_pmu_supported(g)) |
133 | ret |= gk20a_pmu_destroy(g); | 134 | ret |= nvgpu_pmu_destroy(g); |
134 | 135 | ||
135 | ret |= gk20a_gr_suspend(g); | 136 | ret |= gk20a_gr_suspend(g); |
136 | ret |= gk20a_mm_suspend(g); | 137 | ret |= gk20a_mm_suspend(g); |
@@ -259,7 +260,7 @@ int gk20a_finalize_poweron(struct gk20a *g) | |||
259 | #endif | 260 | #endif |
260 | 261 | ||
261 | if (g->ops.pmu.is_pmu_supported(g)) { | 262 | if (g->ops.pmu.is_pmu_supported(g)) { |
262 | err = gk20a_init_pmu_support(g); | 263 | err = nvgpu_init_pmu_support(g); |
263 | if (err) { | 264 | if (err) { |
264 | nvgpu_err(g, "failed to init gk20a pmu"); | 265 | nvgpu_err(g, "failed to init gk20a pmu"); |
265 | goto done; | 266 | goto done; |