On 2026-10-12 10:09 AM, Karol Wachowski wrote:
Copy the API version array from the firmware image header into
struct ivpu_fw_info while the header is being parsed, and use the
cached copy afterwards. This way the raw firmware image header is only
accessed during image parsing, which is a step towards releasing the
firmware image once it has been loaded.
Since the API version is now available in vdev->fw before the
compatibility checks run, drop the redundant fw_hdr parameter from
IVPU_FW_CHECK_API_COMPAT(), IVPU_FW_CHECK_API_VER_LT() and the helpers
behind them, as well as from ivpu_fw_sched_mode_select().
Also make DRM_IVPU_PARAM_FW_API_VERSION read the cached copy instead of
dereferencing the firmware image directly.
No functional change.
Reviewed-by: Dawid Osuchowski <[email protected]>
Co-developed-by: Andrzej Kacprowski <[email protected]>
Signed-off-by: Andrzej Kacprowski <[email protected]>
Signed-off-by: Karol Wachowski <[email protected]>
---
drivers/accel/ivpu/ivpu_drv.c | 5 +----
drivers/accel/ivpu/ivpu_fw.c | 36 +++++++++++++++++------------------
drivers/accel/ivpu/ivpu_fw.h | 1 +
3 files changed, 20 insertions(+), 22 deletions(-)