diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-07-27 16:31:32 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-04 12:24:02 -0400 |
commit | 972c42fddf13f658242a4f92124e5fcf194672b3 (patch) | |
tree | 8b679b522be90f8980fb05d2641fbb9eaca768d6 /drivers/gpu/nvgpu/gp106 | |
parent | b8efd9d04537d6129e2ce8b067417e46b0e7436f (diff) |
gpu: nvgpu: Move debugfs fields to os_linux
Move all Linux specific debugfs dentry fields to struct
nvgpu_os_linux.
JIRA NVGPU-62
Change-Id: I615620005f5d042943dd2e478c1629bcc912c550
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1528263
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/clk_gp106.c | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/mclk_gp106.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/therm_gp106.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/xve_gp106.c | 18 |
4 files changed, 17 insertions, 23 deletions
diff --git a/drivers/gpu/nvgpu/gp106/clk_gp106.c b/drivers/gpu/nvgpu/gp106/clk_gp106.c index 105f8bd5..bcf95b01 100644 --- a/drivers/gpu/nvgpu/gp106/clk_gp106.c +++ b/drivers/gpu/nvgpu/gp106/clk_gp106.c | |||
@@ -23,9 +23,6 @@ | |||
23 | #include <nvgpu/kmem.h> | 23 | #include <nvgpu/kmem.h> |
24 | 24 | ||
25 | #include "gk20a/gk20a.h" | 25 | #include "gk20a/gk20a.h" |
26 | #ifdef CONFIG_DEBUG_FS | ||
27 | #include "gk20a/platform_gk20a.h" | ||
28 | #endif | ||
29 | #include "common/linux/os_linux.h" | 26 | #include "common/linux/os_linux.h" |
30 | 27 | ||
31 | #include "clk_gp106.h" | 28 | #include "clk_gp106.h" |
@@ -240,10 +237,10 @@ static int gp106_get_rate_show(void *data , u64 *val) { | |||
240 | DEFINE_SIMPLE_ATTRIBUTE(get_rate_fops, gp106_get_rate_show, NULL, "%llu\n"); | 237 | DEFINE_SIMPLE_ATTRIBUTE(get_rate_fops, gp106_get_rate_show, NULL, "%llu\n"); |
241 | 238 | ||
242 | 239 | ||
243 | static int clk_gp106_debugfs_init(struct gk20a *g) { | 240 | static int clk_gp106_debugfs_init(struct gk20a *g) |
244 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); | 241 | { |
245 | 242 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); | |
246 | struct dentry *gpu_root = platform->debugfs; | 243 | struct dentry *gpu_root = l->debugfs; |
247 | struct dentry *clocks_root; | 244 | struct dentry *clocks_root; |
248 | struct dentry *d; | 245 | struct dentry *d; |
249 | unsigned int i; | 246 | unsigned int i; |
diff --git a/drivers/gpu/nvgpu/gp106/mclk_gp106.c b/drivers/gpu/nvgpu/gp106/mclk_gp106.c index 47ba4ea9..74c8aef3 100644 --- a/drivers/gpu/nvgpu/gp106/mclk_gp106.c +++ b/drivers/gpu/nvgpu/gp106/mclk_gp106.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #include "gk20a/gk20a.h" | 19 | #include "gk20a/gk20a.h" |
20 | #ifdef CONFIG_DEBUG_FS | 20 | #ifdef CONFIG_DEBUG_FS |
21 | #include "gk20a/platform_gk20a.h" | ||
22 | #include "common/linux/os_linux.h" | 21 | #include "common/linux/os_linux.h" |
23 | #endif | 22 | #endif |
24 | #include "gp106/mclk_gp106.h" | 23 | #include "gp106/mclk_gp106.h" |
@@ -3495,9 +3494,8 @@ static const struct file_operations mclk_switch_stats_fops = { | |||
3495 | 3494 | ||
3496 | static int mclk_debugfs_init(struct gk20a *g) | 3495 | static int mclk_debugfs_init(struct gk20a *g) |
3497 | { | 3496 | { |
3498 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); | 3497 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); |
3499 | 3498 | struct dentry *gpu_root = l->debugfs; | |
3500 | struct dentry *gpu_root = platform->debugfs; | ||
3501 | struct dentry *d; | 3499 | struct dentry *d; |
3502 | 3500 | ||
3503 | gk20a_dbg(gpu_dbg_info, "g=%p", g); | 3501 | gk20a_dbg(gpu_dbg_info, "g=%p", g); |
diff --git a/drivers/gpu/nvgpu/gp106/therm_gp106.c b/drivers/gpu/nvgpu/gp106/therm_gp106.c index 4be8e6cd..4ec43293 100644 --- a/drivers/gpu/nvgpu/gp106/therm_gp106.c +++ b/drivers/gpu/nvgpu/gp106/therm_gp106.c | |||
@@ -18,7 +18,6 @@ | |||
18 | 18 | ||
19 | #ifdef CONFIG_DEBUG_FS | 19 | #ifdef CONFIG_DEBUG_FS |
20 | #include <linux/debugfs.h> | 20 | #include <linux/debugfs.h> |
21 | #include "gk20a/platform_gk20a.h" | ||
22 | #include "common/linux/os_linux.h" | 21 | #include "common/linux/os_linux.h" |
23 | #endif | 22 | #endif |
24 | 23 | ||
@@ -72,11 +71,11 @@ DEFINE_SIMPLE_ATTRIBUTE(therm_ctrl_fops, therm_get_internal_sensor_curr_temp, NU | |||
72 | 71 | ||
73 | void gp106_therm_debugfs_init(struct gk20a *g) | 72 | void gp106_therm_debugfs_init(struct gk20a *g) |
74 | { | 73 | { |
75 | struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); | 74 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); |
76 | struct dentry *dbgentry; | 75 | struct dentry *dbgentry; |
77 | 76 | ||
78 | dbgentry = debugfs_create_file( | 77 | dbgentry = debugfs_create_file( |
79 | "temp", S_IRUGO, platform->debugfs, g, &therm_ctrl_fops); | 78 | "temp", S_IRUGO, l->debugfs, g, &therm_ctrl_fops); |
80 | if (!dbgentry) | 79 | if (!dbgentry) |
81 | nvgpu_err(g, "debugfs entry create failed for therm_curr_temp"); | 80 | nvgpu_err(g, "debugfs entry create failed for therm_curr_temp"); |
82 | } | 81 | } |
diff --git a/drivers/gpu/nvgpu/gp106/xve_gp106.c b/drivers/gpu/nvgpu/gp106/xve_gp106.c index 77641240..67b77048 100644 --- a/drivers/gpu/nvgpu/gp106/xve_gp106.c +++ b/drivers/gpu/nvgpu/gp106/xve_gp106.c | |||
@@ -22,10 +22,10 @@ | |||
22 | #include "gk20a/gk20a.h" | 22 | #include "gk20a/gk20a.h" |
23 | #include "gm206/bios_gm206.h" | 23 | #include "gm206/bios_gm206.h" |
24 | #include "gp106/xve_gp106.h" | 24 | #include "gp106/xve_gp106.h" |
25 | |||
26 | #ifdef CONFIG_DEBUG_FS | 25 | #ifdef CONFIG_DEBUG_FS |
27 | #include "gk20a/platform_gk20a.h" | 26 | #include "gk20a/platform_gk20a.h" |
28 | #endif | 27 | #endif |
28 | #include "common/linux/os_linux.h" | ||
29 | 29 | ||
30 | #include <nvgpu/bug.h> | 30 | #include <nvgpu/bug.h> |
31 | 31 | ||
@@ -607,12 +607,12 @@ int xve_sw_init_gp106(struct device *dev) | |||
607 | { | 607 | { |
608 | int err = -ENODEV; | 608 | int err = -ENODEV; |
609 | #ifdef CONFIG_DEBUG_FS | 609 | #ifdef CONFIG_DEBUG_FS |
610 | struct gk20a *g = get_gk20a(dev); | 610 | struct gk20a *g = gk20a_from_dev(dev); |
611 | struct gk20a_platform *plat = gk20a_get_platform(dev); | 611 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); |
612 | struct dentry *gpu_root = plat->debugfs; | 612 | struct dentry *gpu_root = l->debugfs; |
613 | 613 | ||
614 | g->debugfs_xve = debugfs_create_dir("xve", gpu_root); | 614 | l->debugfs_xve = debugfs_create_dir("xve", gpu_root); |
615 | if (IS_ERR_OR_NULL(g->debugfs_xve)) | 615 | if (IS_ERR_OR_NULL(l->debugfs_xve)) |
616 | goto fail; | 616 | goto fail; |
617 | 617 | ||
618 | /* | 618 | /* |
@@ -620,13 +620,13 @@ int xve_sw_init_gp106(struct device *dev) | |||
620 | * worrying the higher level SW. | 620 | * worrying the higher level SW. |
621 | */ | 621 | */ |
622 | debugfs_create_file("link_speed", S_IRUGO, | 622 | debugfs_create_file("link_speed", S_IRUGO, |
623 | g->debugfs_xve, g, | 623 | l->debugfs_xve, g, |
624 | &xve_link_speed_fops); | 624 | &xve_link_speed_fops); |
625 | debugfs_create_file("available_speeds", S_IRUGO, | 625 | debugfs_create_file("available_speeds", S_IRUGO, |
626 | g->debugfs_xve, g, | 626 | l->debugfs_xve, g, |
627 | &xve_available_speeds_fops); | 627 | &xve_available_speeds_fops); |
628 | debugfs_create_file("link_control_status", S_IRUGO, | 628 | debugfs_create_file("link_control_status", S_IRUGO, |
629 | g->debugfs_xve, g, | 629 | l->debugfs_xve, g, |
630 | &xve_link_control_status_fops); | 630 | &xve_link_control_status_fops); |
631 | 631 | ||
632 | err = 0; | 632 | err = 0; |