On 21/11/2026 19:05, Arun Iyengar via B4 Relay wrote: > From: Arun Iyengar <[email protected]> > > 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 <[email protected]> > Closes: > https://lore.kernel.org/all/[email protected]/ > Cc: [email protected] > Signed-off-by: Arun Iyengar <[email protected]>
Reviewed-by: Steven Price <[email protected]> > --- > 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 <[email protected]> > >
