[PATCH v2 4/5] drm/panthor: Let IRQ handlers clear the interrupts themselves
Steven Price
steven.price at arm.com
Wed Apr 2 11:03:56 UTC 2025
On 02/04/2025 11:58, Boris Brezillon wrote:
> 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
Yeah no problem - it was mostly that when I looked at the code it
appears to be expecting 'status' to have bits set in the top half, but
we then only clear the bits in the lower half. It took a bit of digging
to satisfy myself that the IRQ mask always masks out the top bits.
With an updated commit message I think this is fine.
JM support in panthor is a whole other discussion ;)
Thanks,
Steve
More information about the dri-devel
mailing list