gpu: nvgpu: cde: report use counts to debugfs

Create debugfs nodes for ctx_count, ctx_usecount and ctx_cont_top.

Change-Id: I1360853b2650d37a96c8adf76368d48d9b457909
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/602860
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Konsta Holtta
2014-11-13 14:15:28 +02:00
committed by Dan Willemsen
parent 0e112b6b4b
commit 8d6f5a7529
2 changed files with 9 additions and 3 deletions

View File

@@ -1625,6 +1625,12 @@ void gk20a_cde_debugfs_init(struct platform_device *dev)
debugfs_create_u32("cde_parameter", S_IWUSR | S_IRUGO,
platform->debugfs, &g->cde_app.shader_parameter);
debugfs_create_u32("cde_ctx_count", S_IWUSR | S_IRUGO,
platform->debugfs, &g->cde_app.ctx_count);
debugfs_create_u32("cde_ctx_usecount", S_IWUSR | S_IRUGO,
platform->debugfs, &g->cde_app.ctx_usecount);
debugfs_create_u32("cde_ctx_count_top", S_IWUSR | S_IRUGO,
platform->debugfs, &g->cde_app.ctx_count_top);
debugfs_create_file("reload_cde_firmware", S_IWUSR, platform->debugfs,
g, &gk20a_cde_reload_fops);
}

View File

@@ -272,9 +272,9 @@ struct gk20a_cde_app {
struct list_head free_contexts;
struct list_head used_contexts;
int ctx_count;
int ctx_usecount;
int ctx_count_top;
unsigned int ctx_count;
unsigned int ctx_usecount;
unsigned int ctx_count_top;
u32 firmware_version;