[PATCH v2 4/5] drm/panthor: Let IRQ handlers clear the interrupts themselves

Boris Brezillon boris.brezillon at collabora.com
Wed Apr 2 10:58:20 UTC 2025


On Wed, 2 Apr 2025 11:20:17 +0100
Steven Price <steven.price at arm.com> wrote:

> > static void panthor_mmu_irq_handler(struct panthor_device *ptdev, u32 status)
> > {
> > 	bool has_unhandled_faults = false;
> > 
> > 	status = panthor_mmu_fault_mask(ptdev, status);
> > 	while (status) {
> > 		u32 as = ffs(status | (status >> 16)) - 1;  
> 
> panthor_mmu_fault_mask() masks status with GENMASK(15, 0), so AFAICT
> (status >> 16) is always 0.
> 
> Which isn't a big issue, other than you are now only clearing IRQs which
> are recognised by the loop.

Quick note on that: I think it's been written when I was trying to add
support for CSF in panfrost, and panthor_mmu_fault_mask() (at the time
it was panfrost_mmu_fault_mask()) was a way to have a different
fault_mask for JM and CSF. Now that JM support in panthor is being
considered [1], I'd prefer to keep this logic, even if it seems silly
right now.

[1]https://gitlab.freedesktop.org/panfrost/linux/-/merge_requests/16


More information about the dri-devel mailing list