summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/bios_gp106.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-09-28 13:49:06 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-16 16:34:56 -0400
commit30b9cbe35a2a0adc4e3a65b033dc0f61046783ea (patch)
tree3abdb453042d3632ade9f4cede81886d7ecc70e4 /drivers/gpu/nvgpu/gp106/bios_gp106.c
parent7685f60d9dd6ed062f3037d4e72ea124c103d211 (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/nvgpu/gp106/bios_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/bios_gp106.c27
1 files changed, 2 insertions, 25 deletions
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:
187int gp106_bios_init(struct gk20a *g) 184int 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;
265free_debugfs:
266#ifdef CONFIG_DEBUG_FS
267 debugfs_remove(d);
268#endif
269free_firmware: 246free_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);