summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonino Maniscalco <antomani103@gmail.com>2025-08-21 16:06:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-12-07 00:12:22 +0300
commitfc8edfc2935518a929c29c9401d1744d09ce0d62 (patch)
tree18a50149fafada76b351ac36c4d99651670f24d8
parent37158ce6ba964b62d1e3eebd11f03c6900a52dd1 (diff)
downloadlinux-fc8edfc2935518a929c29c9401d1744d09ce0d62.tar.xz
drm/msm: make sure to not queue up recovery more than once
[ Upstream commit 10fb1b2fcaee5545a5e54db1ed4d7b15c2db50c8 ] If two fault IRQs arrive in short succession recovery work will be queued up twice. When recovery runs a second time it may end up killing an unrelated context. Prevent this by masking off interrupts when triggering recovery. Signed-off-by: Antonino Maniscalco <antomani103@gmail.com> Reviewed-by: Akhil P Oommen <akhilpo@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/670023/ Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/msm/adreno/a6xx_gpu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index cdb4665b953c..e06204e00e93 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -1507,6 +1507,9 @@ static void a6xx_fault_detect_irq(struct msm_gpu *gpu)
/* Turn off the hangcheck timer to keep it from bothering us */
del_timer(&gpu->hangcheck_timer);
+ /* Turn off interrupts to avoid triggering recovery again */
+ gpu_write(gpu, REG_A6XX_RBBM_INT_0_MASK, 0);
+
kthread_queue_work(gpu->worker, &gpu->recover_work);
}