diff options
author | Vinod G <vinodg@nvidia.com> | 2018-06-18 15:04:13 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-20 02:40:49 -0400 |
commit | 06ceff1240902c7f4cdb01dcbc9c988fc5fd9495 (patch) | |
tree | 3dd1b088f7df458119cc8e7f00f75466a04f2d33 /drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | |
parent | 52f1ab0372af3907364dea8b9ff3d25eaa4cbd7f (diff) |
gpu: nvgpu: PG refcount check moved to a wrapper function.
Moved PG refcount checking to a wrapper function, this
function manages the refcount and decides whether to call
dbg_set_powergate function.
Instead of checking the dbg_s->is_pg_disabled variable,
code is checking g->dbg_powergating_disabled_refcount
variable to know if powergate is disabled or not.
Updating hwpm ctxsw mode without disabling powergate
will result in priv errors.
Bug 200410871
Bug 2109765
Change-Id: I33c9022cb04cd39249c78e72584dfe6afb7212d0
Signed-off-by: Vinod G <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1753550
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Richard Zhao <rizhao@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h index b714a648..d9d07844 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | |||
@@ -133,4 +133,6 @@ int gk20a_perfbuf_enable_locked(struct gk20a *g, u64 offset, u32 size); | |||
133 | int gk20a_perfbuf_disable_locked(struct gk20a *g); | 133 | int gk20a_perfbuf_disable_locked(struct gk20a *g); |
134 | 134 | ||
135 | void nvgpu_dbg_session_post_event(struct dbg_session_gk20a *dbg_s); | 135 | void nvgpu_dbg_session_post_event(struct dbg_session_gk20a *dbg_s); |
136 | u32 nvgpu_set_powergate_locked(struct dbg_session_gk20a *dbg_s, | ||
137 | bool mode); | ||
136 | #endif /* DBG_GPU_GK20A_H */ | 138 | #endif /* DBG_GPU_GK20A_H */ |