From 8d6f5a7529d3c5eb85d249da8aa58785d1ebe0e0 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 13 Nov 2014 14:15:28 +0200 Subject: 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 Reviewed-on: http://git-master/r/602860 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 6 ++++++ drivers/gpu/nvgpu/gk20a/cde_gk20a.h | 6 +++--- 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) 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); } 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 { 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; -- cgit v1.2.2