From 668bd75c1ac84d18f0aa0d0b22145d24405fdc8e Mon Sep 17 00:00:00 2001 From: Sagar Kamble Date: Thu, 29 Apr 2021 01:14:50 +0530 Subject: [PATCH] gpu: nvgpu: use deferred_fault_engines for resetting engines during unbind Engine reset is skipped if channel is disassociated from the tsg. During unbind, tsg is disassociated before calling deferred engine reset. Hence any deferred resets don't work actually. Engines to be reset is already set in the variable deferred_fault_engines. Use it. Bug 200711183 Change-Id: I0c2bdcad1770e0ccd001c208a9ac0cf499a374e1 Signed-off-by: Sagar Kamble Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2521974 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Antony Clince Alex Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/channel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c index 9d3aa5fcb..edb720d8a 100644 --- a/drivers/gpu/nvgpu/common/fifo/channel.c +++ b/drivers/gpu/nvgpu/common/fifo/channel.c @@ -2267,6 +2267,7 @@ int nvgpu_channel_deferred_reset_engines(struct gk20a *g, engines = nvgpu_engine_get_mask_on_id(g, tsg->tsgid, true); } else { nvgpu_err(g, "chid: %d is not bound to tsg", ch->chid); + engines = g->fifo.deferred_fault_engines; } if (engines == 0U) {