From 79b37d78320bf050a90b3daf3a464f93cad17d7d Mon Sep 17 00:00:00 2001 From: Sagar Kamble Date: Fri, 25 Feb 2022 16:47:50 +0530 Subject: [PATCH] gpu: nvgpu: dump debug info on semaphore acquire timeout Channel RAMFC has details about the semaphore operation the channel is performing. Getting this can be helpful in debugging the semaph- ore acquire timeout. Add gk20a_debug_dump to pbdma interrupt handler for this case. Bug 3430929 Change-Id: Ia5e3b191a77a7e54d02f45ed2d1beb266905b564 Signed-off-by: Sagar Kamble Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2675344 Reviewed-by: Alex Waterman Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Konsta Holtta Reviewed-by: Vijayakumar Subbu GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/hal/fifo/pbdma_ga10b_fusa.c | 3 +++ drivers/gpu/nvgpu/hal/fifo/pbdma_gm20b_fusa.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/nvgpu/hal/fifo/pbdma_ga10b_fusa.c b/drivers/gpu/nvgpu/hal/fifo/pbdma_ga10b_fusa.c index 620a48fba..1ae99bc3b 100644 --- a/drivers/gpu/nvgpu/hal/fifo/pbdma_ga10b_fusa.c +++ b/drivers/gpu/nvgpu/hal/fifo/pbdma_ga10b_fusa.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -435,6 +436,8 @@ static bool ga10b_pbdma_handle_intr_0_legacy(struct gk20a *g, u32 pbdma_id, recover = true; nvgpu_err(g, "semaphore acquire timeout!"); + gk20a_debug_dump(g); + /* * Note: the error_notifier can be overwritten if * semaphore_timeout is triggered with pbcrc_pending diff --git a/drivers/gpu/nvgpu/hal/fifo/pbdma_gm20b_fusa.c b/drivers/gpu/nvgpu/hal/fifo/pbdma_gm20b_fusa.c index 901393e94..6d145a035 100644 --- a/drivers/gpu/nvgpu/hal/fifo/pbdma_gm20b_fusa.c +++ b/drivers/gpu/nvgpu/hal/fifo/pbdma_gm20b_fusa.c @@ -167,6 +167,8 @@ bool gm20b_pbdma_handle_intr_0(struct gk20a *g, u32 pbdma_id, recover = true; nvgpu_err(g, "semaphore acquire timeout!"); + gk20a_debug_dump(g); + /* * Note: the error_notifier can be overwritten if * semaphore_timeout is triggered with pbcrc_pending