diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 99d5fd4c..1818a57e 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -486,9 +486,24 @@ void gk20a_fifo_delete_runlist(struct fifo_gk20a *f) | |||
486 | static void gk20a_remove_fifo_support(struct fifo_gk20a *f) | 486 | static void gk20a_remove_fifo_support(struct fifo_gk20a *f) |
487 | { | 487 | { |
488 | struct gk20a *g = f->g; | 488 | struct gk20a *g = f->g; |
489 | unsigned int i = 0; | ||
489 | 490 | ||
490 | gk20a_dbg_fn(""); | 491 | gk20a_dbg_fn(""); |
491 | 492 | ||
493 | /* | ||
494 | * Make sure all channels are closed before deleting them. | ||
495 | */ | ||
496 | for (; i < f->num_channels; i++) { | ||
497 | struct channel_gk20a *c = f->channel + i; | ||
498 | |||
499 | /* | ||
500 | * Could race but worst that happens is we get an error message | ||
501 | * from gk20a_free_channel() complaining about multiple closes. | ||
502 | */ | ||
503 | if (c->referenceable) | ||
504 | __gk20a_channel_kill(c); | ||
505 | } | ||
506 | |||
492 | vfree(f->channel); | 507 | vfree(f->channel); |
493 | vfree(f->tsg); | 508 | vfree(f->tsg); |
494 | if (g->ops.mm.is_bar1_supported(g)) | 509 | if (g->ops.mm.is_bar1_supported(g)) |