From 30b9cbe35a2a0adc4e3a65b033dc0f61046783ea Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 28 Sep 2017 10:49:06 -0700 Subject: gpu: nvgpu: Remove bios_blob debugfs linux/debugfs.h was included in gk20a.h because of the debugfs entry bios_blob, which can be used for checking contents of VBIOS. That has never been used, so instead of abstracting it, this patch removes the feature altogether. Two files were using debugfs but did not #include . They failed to build now that gk20a.h no longer #includes it, so added explit #include. JIRA NVGPU-259 Change-Id: Ie1ea9be1a8920441b1616f34e64e505e6e10e38c Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1570404 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/clk/clk_arb.c | 3 +++ drivers/gpu/nvgpu/gk20a/gk20a.h | 6 ------ drivers/gpu/nvgpu/gp106/bios_gp106.c | 27 ++------------------------- drivers/gpu/nvgpu/gp106/mclk_gp106.c | 1 + 4 files changed, 6 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c index 8c27b613..a914b4a2 100644 --- a/drivers/gpu/nvgpu/clk/clk_arb.c +++ b/drivers/gpu/nvgpu/clk/clk_arb.c @@ -28,6 +28,9 @@ #include #include #include +#ifdef CONFIG_DEBUG_FS +#include +#endif #include #include diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index b6f6a97b..8efb009a 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -45,9 +45,6 @@ struct nvgpu_mem_sgt; #include #include #include -#ifdef CONFIG_DEBUG_FS -#include -#endif #include #include @@ -1239,9 +1236,6 @@ struct gk20a { u32 tpc_fs_mask_user; struct nvgpu_bios bios; -#ifdef CONFIG_DEBUG_FS - struct debugfs_blob_wrapper bios_blob; -#endif bool bios_is_init; struct nvgpu_clk_arb *clk_arb; diff --git a/drivers/gpu/nvgpu/gp106/bios_gp106.c b/drivers/gpu/nvgpu/gp106/bios_gp106.c index 3178ae53..a5a244e8 100644 --- a/drivers/gpu/nvgpu/gp106/bios_gp106.c +++ b/drivers/gpu/nvgpu/gp106/bios_gp106.c @@ -31,9 +31,6 @@ #include "gm20b/fifo_gm20b.h" #include "bios_gp106.h" #include "gp106/mclk_gp106.h" -#ifdef CONFIG_DEBUG_FS -#include "common/linux/os_linux.h" -#endif #include #include @@ -187,10 +184,6 @@ out: int gp106_bios_init(struct gk20a *g) { unsigned int i; -#ifdef CONFIG_DEBUG_FS - struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); - struct dentry *d; -#endif int err; gk20a_dbg_fn(""); @@ -232,40 +225,24 @@ int gp106_bios_init(struct gk20a *g) g->power_sensor_missing = true; } -#ifdef CONFIG_DEBUG_FS - g->bios_blob.data = g->bios.data; - g->bios_blob.size = g->bios.size; - - d = debugfs_create_blob("bios", S_IRUGO, l->debugfs, - &g->bios_blob); - if (!d) { - err = -EINVAL; - nvgpu_err(g, "No debugfs?"); - goto free_firmware; - } -#endif gk20a_dbg_fn("done"); err = gp106_bios_devinit(g); if (err) { nvgpu_err(g, "devinit failed"); - goto free_debugfs; + goto free_firmware; } if (nvgpu_is_enabled(g, NVGPU_PMU_RUN_PREOS)) { err = gp106_bios_preos(g); if (err) { nvgpu_err(g, "pre-os failed"); - goto free_debugfs; + goto free_firmware; } } g->bios_is_init = true; return 0; -free_debugfs: -#ifdef CONFIG_DEBUG_FS - debugfs_remove(d); -#endif free_firmware: if (g->bios.data) nvgpu_vfree(g, g->bios.data); diff --git a/drivers/gpu/nvgpu/gp106/mclk_gp106.c b/drivers/gpu/nvgpu/gp106/mclk_gp106.c index 757503e4..e058b02f 100644 --- a/drivers/gpu/nvgpu/gp106/mclk_gp106.c +++ b/drivers/gpu/nvgpu/gp106/mclk_gp106.c @@ -27,6 +27,7 @@ #include "gk20a/gk20a.h" #ifdef CONFIG_DEBUG_FS +#include #include "common/linux/os_linux.h" #endif #include "gp106/mclk_gp106.h" -- cgit v1.2.2