mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-10-26 10:57:38 +08:00
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. Co-developed-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com> Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com> Reviewed-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com> Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com> Link: https://patch.msgid.link/20261012080933.2771862-1-karol.wachowski@linux.intel.com