Skip to content

Commit 30cf36b

Browse files
kwachowsjlawryno
authored andcommitted
accel/ivpu: Dump MMU events in case of VPU boot timeout
Add ivpu_mmu_evtq_dump() function that dumps existing MMU events from MMU event queue. Call this function if VPU boot failed. Previously MMU events were only checked in interrupt handler, but if VPU failed to boot due to MMU faults, those faults were missed because of interrupts not yet being enabled. This will allow checking potential fault reason of VPU not booting. Signed-off-by: Wachowski, Karol <[email protected]> Signed-off-by: Jacek Lawrynowicz <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent cf79f29 commit 30cf36b

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

drivers/accel/ivpu/ivpu_drv.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ int ivpu_boot(struct ivpu_device *vdev)
369369
ret = ivpu_wait_for_ready(vdev);
370370
if (ret) {
371371
ivpu_err(vdev, "Failed to boot the firmware: %d\n", ret);
372+
ivpu_mmu_evtq_dump(vdev);
372373
return ret;
373374
}
374375

drivers/accel/ivpu/ivpu_mmu.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,14 @@ void ivpu_mmu_irq_evtq_handler(struct ivpu_device *vdev)
905905
ivpu_pm_schedule_recovery(vdev);
906906
}
907907

908+
void ivpu_mmu_evtq_dump(struct ivpu_device *vdev)
909+
{
910+
u32 *event;
911+
912+
while ((event = ivpu_mmu_get_event(vdev)) != NULL)
913+
ivpu_mmu_dump_event(vdev, event);
914+
}
915+
908916
void ivpu_mmu_irq_gerr_handler(struct ivpu_device *vdev)
909917
{
910918
u32 gerror_val, gerrorn_val, active;

drivers/accel/ivpu/ivpu_mmu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,6 @@ int ivpu_mmu_invalidate_tlb(struct ivpu_device *vdev, u16 ssid);
4646

4747
void ivpu_mmu_irq_evtq_handler(struct ivpu_device *vdev);
4848
void ivpu_mmu_irq_gerr_handler(struct ivpu_device *vdev);
49+
void ivpu_mmu_evtq_dump(struct ivpu_device *vdev);
4950

5051
#endif /* __IVPU_MMU_H__ */

0 commit comments

Comments
 (0)