]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/msm: make sure to not queue up recovery more than once
authorAntonino Maniscalco <antomani103@gmail.com>
Thu, 21 Aug 2025 13:06:34 +0000 (15:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:34:20 +0000 (15:34 -0500)
[ 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>
drivers/gpu/drm/msm/adreno/a6xx_gpu.c

index 80c78aff96433887592af738819238b7121df8c8..29d39b2bd86e02635eb1a88396fc20761b351951 100644 (file)
@@ -1522,6 +1522,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);
 }