diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/bios_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/bios_gp106.c | 27 |
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: | |||
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); |