diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-09-28 13:49:06 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-16 16:34:56 -0400 |
commit | 30b9cbe35a2a0adc4e3a65b033dc0f61046783ea (patch) | |
tree | 3abdb453042d3632ade9f4cede81886d7ecc70e4 /drivers/gpu | |
parent | 7685f60d9dd6ed062f3037d4e72ea124c103d211 (diff) |
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 <linux/debugfs.h>.
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 <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1570404
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_arb.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/bios_gp106.c | 27 | ||||
-rw-r--r-- | 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 @@ | |||
28 | #include <linux/llist.h> | 28 | #include <linux/llist.h> |
29 | #include <linux/uaccess.h> | 29 | #include <linux/uaccess.h> |
30 | #include <linux/poll.h> | 30 | #include <linux/poll.h> |
31 | #ifdef CONFIG_DEBUG_FS | ||
32 | #include <linux/debugfs.h> | ||
33 | #endif | ||
31 | 34 | ||
32 | #include <nvgpu/bitops.h> | 35 | #include <nvgpu/bitops.h> |
33 | #include <nvgpu/lock.h> | 36 | #include <nvgpu/lock.h> |
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; | |||
45 | #include <nvgpu/lock.h> | 45 | #include <nvgpu/lock.h> |
46 | #include <nvgpu/thread.h> | 46 | #include <nvgpu/thread.h> |
47 | #include <nvgpu/io.h> | 47 | #include <nvgpu/io.h> |
48 | #ifdef CONFIG_DEBUG_FS | ||
49 | #include <linux/debugfs.h> | ||
50 | #endif | ||
51 | 48 | ||
52 | #include <nvgpu/as.h> | 49 | #include <nvgpu/as.h> |
53 | #include <nvgpu/log.h> | 50 | #include <nvgpu/log.h> |
@@ -1239,9 +1236,6 @@ struct gk20a { | |||
1239 | u32 tpc_fs_mask_user; | 1236 | u32 tpc_fs_mask_user; |
1240 | 1237 | ||
1241 | struct nvgpu_bios bios; | 1238 | struct nvgpu_bios bios; |
1242 | #ifdef CONFIG_DEBUG_FS | ||
1243 | struct debugfs_blob_wrapper bios_blob; | ||
1244 | #endif | ||
1245 | bool bios_is_init; | 1239 | bool bios_is_init; |
1246 | 1240 | ||
1247 | struct nvgpu_clk_arb *clk_arb; | 1241 | 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 @@ | |||
31 | #include "gm20b/fifo_gm20b.h" | 31 | #include "gm20b/fifo_gm20b.h" |
32 | #include "bios_gp106.h" | 32 | #include "bios_gp106.h" |
33 | #include "gp106/mclk_gp106.h" | 33 | #include "gp106/mclk_gp106.h" |
34 | #ifdef CONFIG_DEBUG_FS | ||
35 | #include "common/linux/os_linux.h" | ||
36 | #endif | ||
37 | 34 | ||
38 | #include <nvgpu/hw/gp106/hw_pwr_gp106.h> | 35 | #include <nvgpu/hw/gp106/hw_pwr_gp106.h> |
39 | #include <nvgpu/hw/gp106/hw_mc_gp106.h> | 36 | #include <nvgpu/hw/gp106/hw_mc_gp106.h> |
@@ -187,10 +184,6 @@ out: | |||
187 | int gp106_bios_init(struct gk20a *g) | 184 | int gp106_bios_init(struct gk20a *g) |
188 | { | 185 | { |
189 | unsigned int i; | 186 | unsigned int i; |
190 | #ifdef CONFIG_DEBUG_FS | ||
191 | struct nvgpu_os_linux *l = nvgpu_os_linux_from_gk20a(g); | ||
192 | struct dentry *d; | ||
193 | #endif | ||
194 | int err; | 187 | int err; |
195 | 188 | ||
196 | gk20a_dbg_fn(""); | 189 | gk20a_dbg_fn(""); |
@@ -232,40 +225,24 @@ int gp106_bios_init(struct gk20a *g) | |||
232 | g->power_sensor_missing = true; | 225 | g->power_sensor_missing = true; |
233 | } | 226 | } |
234 | 227 | ||
235 | #ifdef CONFIG_DEBUG_FS | ||
236 | g->bios_blob.data = g->bios.data; | ||
237 | g->bios_blob.size = g->bios.size; | ||
238 | |||
239 | d = debugfs_create_blob("bios", S_IRUGO, l->debugfs, | ||
240 | &g->bios_blob); | ||
241 | if (!d) { | ||
242 | err = -EINVAL; | ||
243 | nvgpu_err(g, "No debugfs?"); | ||
244 | goto free_firmware; | ||
245 | } | ||
246 | #endif | ||
247 | gk20a_dbg_fn("done"); | 228 | gk20a_dbg_fn("done"); |
248 | 229 | ||
249 | err = gp106_bios_devinit(g); | 230 | err = gp106_bios_devinit(g); |
250 | if (err) { | 231 | if (err) { |
251 | nvgpu_err(g, "devinit failed"); | 232 | nvgpu_err(g, "devinit failed"); |
252 | goto free_debugfs; | 233 | goto free_firmware; |
253 | } | 234 | } |
254 | 235 | ||
255 | if (nvgpu_is_enabled(g, NVGPU_PMU_RUN_PREOS)) { | 236 | if (nvgpu_is_enabled(g, NVGPU_PMU_RUN_PREOS)) { |
256 | err = gp106_bios_preos(g); | 237 | err = gp106_bios_preos(g); |
257 | if (err) { | 238 | if (err) { |
258 | nvgpu_err(g, "pre-os failed"); | 239 | nvgpu_err(g, "pre-os failed"); |
259 | goto free_debugfs; | 240 | goto free_firmware; |
260 | } | 241 | } |
261 | } | 242 | } |
262 | g->bios_is_init = true; | 243 | g->bios_is_init = true; |
263 | 244 | ||
264 | return 0; | 245 | return 0; |
265 | free_debugfs: | ||
266 | #ifdef CONFIG_DEBUG_FS | ||
267 | debugfs_remove(d); | ||
268 | #endif | ||
269 | free_firmware: | 246 | free_firmware: |
270 | if (g->bios.data) | 247 | if (g->bios.data) |
271 | nvgpu_vfree(g, g->bios.data); | 248 | 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 @@ | |||
27 | 27 | ||
28 | #include "gk20a/gk20a.h" | 28 | #include "gk20a/gk20a.h" |
29 | #ifdef CONFIG_DEBUG_FS | 29 | #ifdef CONFIG_DEBUG_FS |
30 | #include <linux/debugfs.h> | ||
30 | #include "common/linux/os_linux.h" | 31 | #include "common/linux/os_linux.h" |
31 | #endif | 32 | #endif |
32 | #include "gp106/mclk_gp106.h" | 33 | #include "gp106/mclk_gp106.h" |