diff options
author | Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com> | 2023-05-24 10:48:46 +0300 |
---|---|---|
committer | Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> | 2023-07-07 10:33:26 +0300 |
commit | f9d918cfd5c5d3171c65bdfc9a59469f44a976d7 (patch) | |
tree | 19a2b813afcca581c91da59c31cdbc5019a287ff /drivers/accel/ivpu | |
parent | 8f7fb1e21e603b9ffbb116a2ed933e34acb354fa (diff) | |
download | linux-f9d918cfd5c5d3171c65bdfc9a59469f44a976d7.tar.xz |
accel/ivpu: Print firmware name and version
Firmware file name and version are very important for debugging
customer issues - print them as INFO level message instead
of DEBUG message that is turned off by default.
Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230524074847.866711-5-stanislaw.gruszka@linux.intel.com
Diffstat (limited to 'drivers/accel/ivpu')
-rw-r--r-- | drivers/accel/ivpu/ivpu_fw.c | 16 | ||||
-rw-r--r-- | drivers/accel/ivpu/ivpu_fw.h | 1 |
2 files changed, 13 insertions, 4 deletions
diff --git a/drivers/accel/ivpu/ivpu_fw.c b/drivers/accel/ivpu/ivpu_fw.c index 3599bb8706eb..317716482a15 100644 --- a/drivers/accel/ivpu/ivpu_fw.c +++ b/drivers/accel/ivpu/ivpu_fw.c @@ -52,13 +52,19 @@ static int ivpu_fw_request(struct ivpu_device *vdev) int ret = -ENOENT; int i; - if (ivpu_firmware) - return request_firmware(&vdev->fw->file, ivpu_firmware, vdev->drm.dev); + if (ivpu_firmware) { + ret = request_firmware(&vdev->fw->file, ivpu_firmware, vdev->drm.dev); + if (!ret) + vdev->fw->name = ivpu_firmware; + return ret; + } for (i = 0; i < ARRAY_SIZE(fw_names); i++) { ret = firmware_request_nowarn(&vdev->fw->file, fw_names[i], vdev->drm.dev); - if (!ret) + if (!ret) { + vdev->fw->name = fw_names[i]; return 0; + } } ivpu_err(vdev, "Failed to request firmware: %d\n", ret); @@ -143,7 +149,9 @@ static int ivpu_fw_parse(struct ivpu_device *vdev) } ivpu_dbg(vdev, FW_BOOT, "Header version: 0x%x, format 0x%x\n", fw_hdr->header_version, fw_hdr->image_format); - ivpu_dbg(vdev, FW_BOOT, "FW version: %s\n", (char *)fw_hdr + VPU_FW_HEADER_SIZE); + + ivpu_info(vdev, "Firmware: %s, version: %s", fw->name, + (const char *)fw_hdr + VPU_FW_HEADER_SIZE); if (IVPU_FW_CHECK_API(vdev, fw_hdr, BOOT, 3)) return -EINVAL; diff --git a/drivers/accel/ivpu/ivpu_fw.h b/drivers/accel/ivpu/ivpu_fw.h index 3cc3a1497a4a..8567fdf925fe 100644 --- a/drivers/accel/ivpu/ivpu_fw.h +++ b/drivers/accel/ivpu/ivpu_fw.h @@ -12,6 +12,7 @@ struct vpu_boot_params; struct ivpu_fw_info { const struct firmware *file; + const char *name; struct ivpu_bo *mem; struct ivpu_bo *mem_shave_nn; struct ivpu_bo *mem_log_crit; |