diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 936e4d04..571570d8 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <nvgpu/list.h> | 29 | #include <nvgpu/list.h> |
30 | #include <nvgpu/circ_buf.h> | 30 | #include <nvgpu/circ_buf.h> |
31 | #include <nvgpu/cond.h> | 31 | #include <nvgpu/cond.h> |
32 | #include <nvgpu/enabled.h> | ||
32 | 33 | ||
33 | #include "gk20a.h" | 34 | #include "gk20a.h" |
34 | #include "debug_gk20a.h" | 35 | #include "debug_gk20a.h" |
@@ -126,7 +127,7 @@ static void free_channel(struct fifo_gk20a *f, | |||
126 | * On teardown it is not possible to dereference platform, but ignoring | 127 | * On teardown it is not possible to dereference platform, but ignoring |
127 | * this is fine then because no new channels would be created. | 128 | * this is fine then because no new channels would be created. |
128 | */ | 129 | */ |
129 | if (!g->driver_is_dying) { | 130 | if (!nvgpu_is_enabled(g, NVGPU_DRIVER_IS_DYING)) { |
130 | if (g->aggressive_sync_destroy_thresh && | 131 | if (g->aggressive_sync_destroy_thresh && |
131 | (f->used_channels < | 132 | (f->used_channels < |
132 | g->aggressive_sync_destroy_thresh)) | 133 | g->aggressive_sync_destroy_thresh)) |
@@ -2418,7 +2419,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c, | |||
2418 | struct nvgpu_gpfifo __user *user_gpfifo = args ? | 2419 | struct nvgpu_gpfifo __user *user_gpfifo = args ? |
2419 | (struct nvgpu_gpfifo __user *)(uintptr_t)args->gpfifo : NULL; | 2420 | (struct nvgpu_gpfifo __user *)(uintptr_t)args->gpfifo : NULL; |
2420 | 2421 | ||
2421 | if (g->driver_is_dying) | 2422 | if (nvgpu_is_enabled(g, NVGPU_DRIVER_IS_DYING)) |
2422 | return -ENODEV; | 2423 | return -ENODEV; |
2423 | 2424 | ||
2424 | if (c->has_timedout) | 2425 | if (c->has_timedout) |