gpu: nvgpu: move dump_ctxsw_stats_on_channel_close flag to gr_ctx_desc

Debug boolean flag dump_ctxsw_stats_on_channel_close is right now stored
in gr_gk20a.ctx_vars struct
This flag logically is property of gr.ctx units since it indicates
whether each context should dump ctxsw stats on channel/context close

Move this flag to struct nvgpu_gr_ctx_desc and remove it from
gr_gk20a.ctx_vars

Expose below API from gr.ctx unit to check if flag is set
nvgpu_gr_ctx_desc_dump_ctxsw_stats_on_channel_close()

Move debugfs creation code to create corresponding debugfs to
gr_gk20a_debugfs_init() and change debugfs type from "u32" to "file"

Struct gr.gr_ctx_desc is created only during first poweron.
Return error if this struct is not available.

Remove unnecessary initialization of this variable from platform
specific probe functions

Jira NVGPU-3112

Change-Id: Id675e047237f82e9b8198a42082e99c95824578f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2099399
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Deepak Nibade
2019-04-15 17:23:17 +05:30
committed by mobile promotions
parent ee5b3823ff
commit 77140c1a84
9 changed files with 72 additions and 18 deletions

View File

@@ -411,11 +411,6 @@ void gk20a_debug_init(struct gk20a *g, const char *debugfs_symlink)
l->debugfs,
&g->runlist_interleave);
l->debugfs_dump_ctxsw_stats =
debugfs_create_bool("dump_ctxsw_stats_on_channel_close",
S_IRUGO|S_IWUSR, l->debugfs,
&g->gr->ctx_vars.dump_ctxsw_stats_on_channel_close);
gr_gk20a_debugfs_init(g);
gk20a_pmu_debugfs_init(g);
gk20a_railgating_debugfs_init(g);