summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_as.c1
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c1
-rw-r--r--drivers/gpu/nvgpu/common/linux/kmem.c2
-rw-r--r--drivers/gpu/nvgpu/common/linux/module.c4
-rw-r--r--drivers/gpu/nvgpu/common/linux/pci.c2
5 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_as.c b/drivers/gpu/nvgpu/common/linux/ioctl_as.c
index d9316c7f..6a9d3811 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_as.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_as.c
@@ -15,6 +15,7 @@
15 15
16#include <linux/cdev.h> 16#include <linux/cdev.h>
17#include <linux/uaccess.h> 17#include <linux/uaccess.h>
18#include <linux/fs.h>
18 19
19#include <nvgpu/log2.h> 20#include <nvgpu/log2.h>
20 21
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
index 0546658d..97e911b9 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c
@@ -18,6 +18,7 @@
18#include <linux/cdev.h> 18#include <linux/cdev.h>
19#include <linux/file.h> 19#include <linux/file.h>
20#include <linux/anon_inodes.h> 20#include <linux/anon_inodes.h>
21#include <linux/fs.h>
21#include <uapi/linux/nvgpu.h> 22#include <uapi/linux/nvgpu.h>
22 23
23#include <nvgpu/bitops.h> 24#include <nvgpu/bitops.h>
diff --git a/drivers/gpu/nvgpu/common/linux/kmem.c b/drivers/gpu/nvgpu/common/linux/kmem.c
index 4fe68830..f38a5e78 100644
--- a/drivers/gpu/nvgpu/common/linux/kmem.c
+++ b/drivers/gpu/nvgpu/common/linux/kmem.c
@@ -479,6 +479,7 @@ static void print_histogram(struct nvgpu_mem_alloc_tracker *tracker,
479 } 479 }
480} 480}
481 481
482#ifdef CONFIG_DEBUG_FS
482/** 483/**
483 * nvgpu_kmem_print_stats - Print kmem tracking stats. 484 * nvgpu_kmem_print_stats - Print kmem tracking stats.
484 * 485 *
@@ -515,7 +516,6 @@ void nvgpu_kmem_print_stats(struct nvgpu_mem_alloc_tracker *tracker,
515 unlock_tracker(tracker); 516 unlock_tracker(tracker);
516} 517}
517 518
518#if defined(CONFIG_DEBUG_FS)
519static int __kmem_tracking_show(struct seq_file *s, void *unused) 519static int __kmem_tracking_show(struct seq_file *s, void *unused)
520{ 520{
521 struct nvgpu_mem_alloc_tracker *tracker = s->private; 521 struct nvgpu_mem_alloc_tracker *tracker = s->private;
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c
index 79d6bd5f..ebc25a26 100644
--- a/drivers/gpu/nvgpu/common/linux/module.c
+++ b/drivers/gpu/nvgpu/common/linux/module.c
@@ -615,9 +615,9 @@ static int gk20a_pm_unrailgate(struct device *dev)
615{ 615{
616 struct gk20a_platform *platform = dev_get_drvdata(dev); 616 struct gk20a_platform *platform = dev_get_drvdata(dev);
617 int ret = 0; 617 int ret = 0;
618#ifdef CONFIG_DEBUG_FS
618 struct gk20a *g = get_gk20a(dev); 619 struct gk20a *g = get_gk20a(dev);
619 620
620#ifdef CONFIG_DEBUG_FS
621 g->pstats.last_rail_ungate_start = jiffies; 621 g->pstats.last_rail_ungate_start = jiffies;
622 if (g->pstats.railgating_cycle_count >= 1) 622 if (g->pstats.railgating_cycle_count >= 1)
623 g->pstats.total_rail_gate_time_ms = 623 g->pstats.total_rail_gate_time_ms =
@@ -974,8 +974,10 @@ static int __exit gk20a_remove(struct platform_device *pdev)
974 974
975 gk20a_user_deinit(dev, &nvgpu_class); 975 gk20a_user_deinit(dev, &nvgpu_class);
976 976
977#ifdef CONFIG_DEBUG_FS
977 debugfs_remove_recursive(platform->debugfs); 978 debugfs_remove_recursive(platform->debugfs);
978 debugfs_remove_recursive(platform->debugfs_alias); 979 debugfs_remove_recursive(platform->debugfs_alias);
980#endif
979 981
980 gk20a_remove_sysfs(dev); 982 gk20a_remove_sysfs(dev);
981 983
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c
index 0bad2b67..b4e6cb7c 100644
--- a/drivers/gpu/nvgpu/common/linux/pci.c
+++ b/drivers/gpu/nvgpu/common/linux/pci.c
@@ -463,8 +463,10 @@ static void nvgpu_pci_remove(struct pci_dev *pdev)
463 gk20a_user_deinit(g->dev, &nvgpu_pci_class); 463 gk20a_user_deinit(g->dev, &nvgpu_pci_class);
464 gk20a_dbg(gpu_dbg_shutdown, "User de-init done.\b"); 464 gk20a_dbg(gpu_dbg_shutdown, "User de-init done.\b");
465 465
466#ifdef CONFIG_DEBUG_FS
466 debugfs_remove_recursive(platform->debugfs); 467 debugfs_remove_recursive(platform->debugfs);
467 debugfs_remove_recursive(platform->debugfs_alias); 468 debugfs_remove_recursive(platform->debugfs_alias);
469#endif
468 470
469 gk20a_remove_sysfs(g->dev); 471 gk20a_remove_sysfs(g->dev);
470 472