diff options
author | Sunny He <suhe@nvidia.com> | 2017-08-01 18:03:26 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-21 16:06:04 -0400 |
commit | b50b379c192714d0d08c3f2d33e90c95cf795253 (patch) | |
tree | bd7786d1fec51f168a9393fcb16a8fe56ad25044 /drivers/gpu/nvgpu/common/pmu/pmu.c | |
parent | 192f1039e11893b9216819837eee871612225849 (diff) |
gpu: nvgpu: Move non-fp pmu members from gpu_ops
Move non-function pointer members out of the pmu and pmu_ver
substructs of gpu_ops. Ideally gpu_ops will have only function
ponters, better matching its intended purpose and improving
readability.
- g.ops.pmu_ver.cmd_id_zbc_table_update has been changed to
g.pmu_ver_cmd_id_zbc_table_update
- g.ops.pmu.lspmuwprinitdone has been changed to
g.pmu_lsf_pmu_wpr_init_done
- g.ops.pmu.lsfloadedfalconid has been changed to
g.pmu_lsf_loaded_falcon_id
Boolean flags have been implemented using the enabled.h API
- g.ops.pmu_ver.is_pmu_zbc_save_supported moved to
common flag NVGPU_PMU_ZBC_SAVE
- g.ops.pmu.fecsbootstrapdone moved to
common flag NVGPU_PMU_FECS_BOOTSTRAP_DONE
Jira NVGPU-74
Change-Id: I08fb20f8f382277f2c579f06d561914c000ea6e0
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1530981
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/pmu/pmu.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/pmu/pmu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu.c b/drivers/gpu/nvgpu/common/pmu/pmu.c index 294034a7..58108722 100644 --- a/drivers/gpu/nvgpu/common/pmu/pmu.c +++ b/drivers/gpu/nvgpu/common/pmu/pmu.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <nvgpu/dma.h> | 15 | #include <nvgpu/dma.h> |
16 | #include <nvgpu/log.h> | 16 | #include <nvgpu/log.h> |
17 | #include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> | 17 | #include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h> |
18 | #include <nvgpu/enabled.h> | ||
18 | 19 | ||
19 | #include "gk20a/gk20a.h" | 20 | #include "gk20a/gk20a.h" |
20 | 21 | ||
@@ -356,7 +357,7 @@ static void pmu_setup_hw_enable_elpg(struct gk20a *g) | |||
356 | pmu->initialized = true; | 357 | pmu->initialized = true; |
357 | nvgpu_pmu_state_change(g, PMU_STATE_STARTED, true); | 358 | nvgpu_pmu_state_change(g, PMU_STATE_STARTED, true); |
358 | 359 | ||
359 | if (g->ops.pmu_ver.is_pmu_zbc_save_supported) { | 360 | if (nvgpu_is_enabled(g, NVGPU_PMU_ZBC_SAVE)) { |
360 | /* Save zbc table after PMU is initialized. */ | 361 | /* Save zbc table after PMU is initialized. */ |
361 | pmu->zbc_ready = true; | 362 | pmu->zbc_ready = true; |
362 | gk20a_pmu_save_zbc(g, 0xf); | 363 | gk20a_pmu_save_zbc(g, 0xf); |
@@ -507,8 +508,8 @@ int nvgpu_pmu_destroy(struct gk20a *g) | |||
507 | pmu->pmu_ready = false; | 508 | pmu->pmu_ready = false; |
508 | pmu->perfmon_ready = false; | 509 | pmu->perfmon_ready = false; |
509 | pmu->zbc_ready = false; | 510 | pmu->zbc_ready = false; |
510 | g->ops.pmu.lspmuwprinitdone = false; | 511 | g->pmu_lsf_pmu_wpr_init_done = false; |
511 | g->ops.pmu.fecsbootstrapdone = false; | 512 | __nvgpu_set_enabled(g, NVGPU_PMU_FECS_BOOTSTRAP_DONE, false); |
512 | 513 | ||
513 | nvgpu_log_fn(g, "done"); | 514 | nvgpu_log_fn(g, "done"); |
514 | return 0; | 515 | return 0; |