Skip to content

Commit 2a20b85

Browse files
kwachowsjlawryno
authored andcommitted
accel/ivpu: Add diagnostic messages when VPU fails to boot or suspend
Make boot/suspend failure debugging easier by dumping FW logs and error registers. 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 8047d36 commit 2a20b85

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

drivers/accel/ivpu/ivpu_drv.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "ivpu_debugfs.h"
1818
#include "ivpu_drv.h"
1919
#include "ivpu_fw.h"
20+
#include "ivpu_fw_log.h"
2021
#include "ivpu_gem.h"
2122
#include "ivpu_hw.h"
2223
#include "ivpu_ipc.h"
@@ -340,8 +341,6 @@ static int ivpu_wait_for_ready(struct ivpu_device *vdev)
340341

341342
if (!ret)
342343
ivpu_dbg(vdev, PM, "VPU ready message received successfully\n");
343-
else
344-
ivpu_hw_diagnose_failure(vdev);
345344

346345
return ret;
347346
}
@@ -369,7 +368,9 @@ int ivpu_boot(struct ivpu_device *vdev)
369368
ret = ivpu_wait_for_ready(vdev);
370369
if (ret) {
371370
ivpu_err(vdev, "Failed to boot the firmware: %d\n", ret);
371+
ivpu_hw_diagnose_failure(vdev);
372372
ivpu_mmu_evtq_dump(vdev);
373+
ivpu_fw_log_dump(vdev);
373374
return ret;
374375
}
375376

drivers/accel/ivpu/ivpu_pm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "ivpu_drv.h"
1414
#include "ivpu_hw.h"
1515
#include "ivpu_fw.h"
16+
#include "ivpu_fw_log.h"
1617
#include "ivpu_ipc.h"
1718
#include "ivpu_job.h"
1819
#include "ivpu_jsm_msg.h"
@@ -247,7 +248,8 @@ int ivpu_pm_runtime_suspend_cb(struct device *dev)
247248
ivpu_err(vdev, "Failed to set suspend VPU: %d\n", ret);
248249

249250
if (!hw_is_idle) {
250-
ivpu_warn(vdev, "VPU failed to enter idle, force suspended.\n");
251+
ivpu_err(vdev, "VPU failed to enter idle, force suspended.\n");
252+
ivpu_fw_log_dump(vdev);
251253
ivpu_pm_prepare_cold_boot(vdev);
252254
} else {
253255
ivpu_pm_prepare_warm_boot(vdev);

0 commit comments

Comments
 (0)