mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 12:30:23 +09:00
drm/panfrost: Clear MMU irqs before handling the fault
commit3aa0a80fc6upstream. When a fault is handled it will unblock the GPU which will continue executing its shader and might fault almost immediately on a different page. If we clear interrupts after handling the fault we might miss new faults, so clear them before. Cc: <stable@vger.kernel.org> Fixes:187d292920("drm/panfrost: Add support for GPU heap allocations") Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210205111757.585248-2-boris.brezillon@collabora.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
08f6e8a753
commit
abb79f67a9
@@ -600,6 +600,8 @@ static irqreturn_t panfrost_mmu_irq_handler_thread(int irq, void *data)
|
||||
access_type = (fault_status >> 8) & 0x3;
|
||||
source_id = (fault_status >> 16);
|
||||
|
||||
mmu_write(pfdev, MMU_INT_CLEAR, mask);
|
||||
|
||||
/* Page fault only */
|
||||
ret = -1;
|
||||
if ((status & mask) == BIT(i) && (exception_type & 0xF8) == 0xC0)
|
||||
@@ -623,8 +625,6 @@ static irqreturn_t panfrost_mmu_irq_handler_thread(int irq, void *data)
|
||||
access_type, access_type_name(pfdev, fault_status),
|
||||
source_id);
|
||||
|
||||
mmu_write(pfdev, MMU_INT_CLEAR, mask);
|
||||
|
||||
status &= ~mask;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user