From b6365771ec89468fdf07ec6fd52eb554e911f262 Mon Sep 17 00:00:00 2001 From: Gourav Kumar Date: Thu, 2 Apr 2026 11:44:12 +0530 Subject: [PATCH] media: iris: Update MDT PAS load call for new API The Qualcomm MDT loader changed qcom_mdt_pas_load() to take only four arguments and use the PAS context for relocation and memory handling. Update the iris firmware loading path to match that interface by dropping the temporary memremap/memunmap flow, removing the extra mem_virt argument from qcom_mdt_pas_load(), and simplifying the error path accordingly. This keeps the iris driver aligned with the SCM/PAS loader changes and fixes the build failure caused by the old five-argument call. Link: https://github.com/qualcomm-linux/qcom-6.18.y/pull/413 Signed-off-by: Gourav Kumar --- drivers/media/platform/qcom/iris/iris_firmware.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_firmware.c b/drivers/media/platform/qcom/iris/iris_firmware.c index 56c477b36b61..e1b0f2473f1e 100644 --- a/drivers/media/platform/qcom/iris/iris_firmware.c +++ b/drivers/media/platform/qcom/iris/iris_firmware.c @@ -29,7 +29,6 @@ static int iris_load_fw_to_memory(struct iris_core *core, const char *fw_name) phys_addr_t mem_phys; size_t res_size; ssize_t fw_size; - void *mem_virt; int ret; if (strlen(fw_name) >= MAX_FIRMWARE_NAME_SIZE - 4) @@ -59,30 +58,22 @@ static int iris_load_fw_to_memory(struct iris_core *core, const char *fw_name) goto err_release_fw; } - mem_virt = memremap(mem_phys, res_size, MEMREMAP_WC); - if (!mem_virt) { - ret = -ENOMEM; - goto err_release_fw; - } - core->pas_ctx->use_tzmem = !!core->fw_dev; - ret = qcom_mdt_pas_load(core->pas_ctx, firmware, fw_name, mem_virt, NULL); + ret = qcom_mdt_pas_load(core->pas_ctx, firmware, fw_name, NULL); if (ret) - goto err_mem_unmap; + goto err_release_fw; if (core->pas_ctx->use_tzmem) { domain = iommu_get_domain_for_dev(fw_dev); if (!domain) { ret = -ENODEV; - goto err_mem_unmap; + goto err_release_fw; } ret = iommu_map(domain, IRIS_FW_START_ADDR, mem_phys, res_size, IOMMU_READ | IOMMU_WRITE | IOMMU_PRIV, GFP_KERNEL); } -err_mem_unmap: - memunmap(mem_virt); err_release_fw: release_firmware(firmware);