* [PATCH] drm/panfrost: Unmask the interrupts of a re-enabled address space
@ 2026-11-21 19:05 Arun Iyengar via B4 Relay
2026-11-24 8:34 ` Boris Brezillon
0 siblings, 1 reply; 2+ messages in thread
From: Arun Iyengar via B4 Relay @ 2026-11-21 19:05 UTC (permalink / raw)
To: Boris Brezillon, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter
Cc: dri-devel, linux-kernel, Arun Iyengar
From: Arun Iyengar <aiyengar1990@gmail.com>
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@kernel.org>
Closes: https://lore.kernel.org/all/20260811215454.A1C8D1F000E9@smtp.kernel.org/
Cc: stable@vger.kernel.org
Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
---
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@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] drm/panfrost: Unmask the interrupts of a re-enabled address space
2026-11-21 19:05 [PATCH] drm/panfrost: Unmask the interrupts of a re-enabled address space Arun Iyengar via B4 Relay
@ 2026-11-24 8:34 ` Boris Brezillon
0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2026-11-24 8:34 UTC (permalink / raw)
To: Arun Iyengar via B4 Relay
Cc: aiyengar1990, Rob Herring, Steven Price, Adrián Larumbe,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, dri-devel, linux-kernel
On Sat, 21 Nov 2026 19:05:20 +0000
Arun Iyengar via B4 Relay <devnull+aiyengar1990.gmail.com@kernel.org>
wrote:
> From: Arun Iyengar <aiyengar1990@gmail.com>
>
> 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@kernel.org>
> Closes: https://lore.kernel.org/all/20260811215454.A1C8D1F000E9@smtp.kernel.org/
> Cc: stable@vger.kernel.org
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
> 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@gmail.com>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-24 8:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-21 19:05 [PATCH] drm/panfrost: Unmask the interrupts of a re-enabled address space Arun Iyengar via B4 Relay
2026-11-24 8:34 ` Boris Brezillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®