gpu: nvgpu: reset the nvs user mask before resetting the queue

user->active_used_queues mask should be unset before the queue->mask
gets reset as part of queue->free calls otherwise user will be
considered as active and will avoid the proper cleanup.

Bug 3884011

Change-Id: I7a9d620a5dae057df2eb41fced8c801e14639e61
Signed-off-by: prsethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2818962
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
prsethi
2022-11-30 04:28:17 +00:00
committed by mobile promotions
parent 469ad373b4
commit bd134326f8

View File

@@ -966,6 +966,8 @@ static int nvgpu_nvs_ctrl_fifo_destroy_queue(struct gk20a *g,
goto fail; goto fail;
} }
nvgpu_nvs_ctrl_fifo_user_unsubscribe_queue(user, queue);
/* For Event Queues, don't erase even if the buffer /* For Event Queues, don't erase even if the buffer
* is currently not mapped. There might be some observers * is currently not mapped. There might be some observers
* who has acquired the dma_bufs but hasn't mapped yet. * who has acquired the dma_bufs but hasn't mapped yet.
@@ -982,8 +984,6 @@ static int nvgpu_nvs_ctrl_fifo_destroy_queue(struct gk20a *g,
} }
} }
nvgpu_nvs_ctrl_fifo_user_unsubscribe_queue(user, queue);
nvgpu_nvs_ctrl_fifo_unlock_queues(g); nvgpu_nvs_ctrl_fifo_unlock_queues(g);
return 0; return 0;