diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index f4e7fe45..31b0a771 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <nvgpu/allocator.h> | 23 | #include <nvgpu/allocator.h> |
24 | #include <nvgpu/timers.h> | 24 | #include <nvgpu/timers.h> |
25 | #include <nvgpu/soc.h> | 25 | #include <nvgpu/soc.h> |
26 | #include <nvgpu/enabled.h> | ||
26 | 27 | ||
27 | #include <trace/events/gk20a.h> | 28 | #include <trace/events/gk20a.h> |
28 | 29 | ||
@@ -364,20 +365,20 @@ done: | |||
364 | */ | 365 | */ |
365 | int gk20a_can_busy(struct gk20a *g) | 366 | int gk20a_can_busy(struct gk20a *g) |
366 | { | 367 | { |
367 | if (g->driver_is_dying) | 368 | if (nvgpu_is_enabled(g, NVGPU_DRIVER_IS_DYING)) |
368 | return 0; | 369 | return 0; |
369 | return 1; | 370 | return 1; |
370 | } | 371 | } |
371 | 372 | ||
372 | /* | 373 | /* |
373 | * Start the process for unloading the driver. Set g->driver_is_dying. | 374 | * Start the process for unloading the driver. Set NVGPU_DRIVER_IS_DYING. |
374 | */ | 375 | */ |
375 | void gk20a_driver_start_unload(struct gk20a *g) | 376 | void gk20a_driver_start_unload(struct gk20a *g) |
376 | { | 377 | { |
377 | gk20a_dbg(gpu_dbg_shutdown, "Driver is now going down!\n"); | 378 | gk20a_dbg(gpu_dbg_shutdown, "Driver is now going down!\n"); |
378 | 379 | ||
379 | down_write(&g->busy_lock); | 380 | down_write(&g->busy_lock); |
380 | g->driver_is_dying = 1; | 381 | __nvgpu_set_enabled(g, NVGPU_DRIVER_IS_DYING, true); |
381 | up_write(&g->busy_lock); | 382 | up_write(&g->busy_lock); |
382 | 383 | ||
383 | if (g->is_virtual) | 384 | if (g->is_virtual) |