summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2014-11-13 07:15:28 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:13 -0400
commit8d6f5a7529d3c5eb85d249da8aa58785d1ebe0e0 (patch)
tree3f4a7642dc3eaac1cd9611eb86ae26d24bac3a8e
parent0e112b6b4b9c937fbeb1b71d28a43f4fadc6abb6 (diff)
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>
-rw-r--r--drivers/gpu/nvgpu/gk20a/cde_gk20a.c6
-rw-r--r--drivers/gpu/nvgpu/gk20a/cde_gk20a.h6
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c
index c5368e46..65d6dd4d 100644
--- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c
@@ -1625,6 +1625,12 @@ void gk20a_cde_debugfs_init(struct platform_device *dev)
1625 1625
1626 debugfs_create_u32("cde_parameter", S_IWUSR | S_IRUGO, 1626 debugfs_create_u32("cde_parameter", S_IWUSR | S_IRUGO,
1627 platform->debugfs, &g->cde_app.shader_parameter); 1627 platform->debugfs, &g->cde_app.shader_parameter);
1628 debugfs_create_u32("cde_ctx_count", S_IWUSR | S_IRUGO,
1629 platform->debugfs, &g->cde_app.ctx_count);
1630 debugfs_create_u32("cde_ctx_usecount", S_IWUSR | S_IRUGO,
1631 platform->debugfs, &g->cde_app.ctx_usecount);
1632 debugfs_create_u32("cde_ctx_count_top", S_IWUSR | S_IRUGO,
1633 platform->debugfs, &g->cde_app.ctx_count_top);
1628 debugfs_create_file("reload_cde_firmware", S_IWUSR, platform->debugfs, 1634 debugfs_create_file("reload_cde_firmware", S_IWUSR, platform->debugfs,
1629 g, &gk20a_cde_reload_fops); 1635 g, &gk20a_cde_reload_fops);
1630} 1636}
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.h b/drivers/gpu/nvgpu/gk20a/cde_gk20a.h
index b160162c..66c18d5a 100644
--- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.h
@@ -272,9 +272,9 @@ struct gk20a_cde_app {
272 272
273 struct list_head free_contexts; 273 struct list_head free_contexts;
274 struct list_head used_contexts; 274 struct list_head used_contexts;
275 int ctx_count; 275 unsigned int ctx_count;
276 int ctx_usecount; 276 unsigned int ctx_usecount;
277 int ctx_count_top; 277 unsigned int ctx_count_top;
278 278
279 u32 firmware_version; 279 u32 firmware_version;
280 280