gpu:nvgpu: clean the domain queues in abrupt close

Domain queues are being cleaned as part of graceful close but does not
gets cleaned in case of abrupt app failures.
This change cleanup the queues for abrupt failures.

Bug 3884011

Change-Id: I8cd07b726718b1e13a05d4455a2670cedc9dee37
Signed-off-by: prsethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2842632
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
prsethi
2023-01-12 17:08:22 +00:00
committed by mobile promotions
parent 04cd344b35
commit 4dec633f5f
3 changed files with 103 additions and 5 deletions

View File

@@ -482,6 +482,27 @@ bool nvgpu_nvs_buffer_is_valid(struct gk20a *g, struct nvgpu_nvs_ctrl_queue *buf
return buf->valid;
}
bool nvgpu_nvs_buffer_is_sendq_valid(struct gk20a *g)
{
struct nvgpu_nvs_domain_ctrl_fifo *sched_ctrl = g->sched_ctrl_fifo;
return nvgpu_nvs_buffer_is_valid(g, &sched_ctrl->queues.send);
}
bool nvgpu_nvs_buffer_is_receiveq_valid(struct gk20a *g)
{
struct nvgpu_nvs_domain_ctrl_fifo *sched_ctrl = g->sched_ctrl_fifo;
return nvgpu_nvs_buffer_is_valid(g, &sched_ctrl->queues.receive);
}
bool nvgpu_nvs_buffer_is_eventq_valid(struct gk20a *g)
{
struct nvgpu_nvs_domain_ctrl_fifo *sched_ctrl = g->sched_ctrl_fifo;
return nvgpu_nvs_buffer_is_valid(g, &sched_ctrl->queues.event);
}
int nvgpu_nvs_buffer_alloc(struct nvgpu_nvs_domain_ctrl_fifo *sched_ctrl,
size_t bytes, u8 mask, struct nvgpu_nvs_ctrl_queue *buf)
{