[PATCH] drm/panfrost: Unmask the interrupts of a re-enabled address space
From: Arun Iyengar via B4 Relay
Date: Sat Nov 21 2026 - 14:05:27 EST
From: Arun Iyengar <aiyengar1990@xxxxxxxxx>
Sashiko reported this in a review of an unrelated patch.
After an unhandled fault the AS is in as_faulty_mask and its interrupts
are masked. panfrost_mmu_as_get() re-enables the AS but writes
MMU_INT_MASK before it clears the AS from as_faulty_mask, so the
interrupts stay masked and the next fault on the AS hangs the job until
the scheduler timeout. Clear the bit first.
Fixes: ed7a34c57def ("drm/panfrost: Disable the AS on unhandled page faults")
Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
Closes: https://lore.kernel.org/all/20260811215454.A1C8D1F000E9@xxxxxxxxxxxxxxx/
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Arun Iyengar <aiyengar1990@xxxxxxxxx>
---
Tested on a Mali-G31 (H616), 7.3.5 with 8a597d099b8b and e9672bf9382f:
a heap fault after an unhandled fault got no MMU interrupt and the job
timed out; with this patch as the only change it is handled at once.
Claude (Anthropic) wrote the patch and the commit message; I reviewed
them and tested as above.
---
drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
index faa62643c..98d52aca4 100644
--- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
+++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
@@ -283,9 +283,9 @@ int panfrost_mmu_as_get(struct panfrost_device *pfdev, struct panfrost_mmu *mmu)
* disabled. We need to re-enable the MMU after
* clearing+unmasking the AS interrupts.
*/
+ pfdev->as_faulty_mask &= ~mask;
mmu_write(pfdev, MMU_INT_CLEAR, mask);
mmu_write(pfdev, MMU_INT_MASK, ~pfdev->as_faulty_mask);
- pfdev->as_faulty_mask &= ~mask;
panfrost_mmu_enable(pfdev, mmu);
}
---
base-commit: c408466a4dfaee4b12587e926c5b85e68c8b3c40
change-id: 20261121-panfrost-mmu-as-mask-f5e7ba0994b9
Best regards,
--
Arun Iyengar <aiyengar1990@xxxxxxxxx>