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 <gouravk@qti.qualcomm.com>
This commit is contained in:
Gourav Kumar
2026-08-05 15:36:04 +03:00
committed by Abel Vesa
parent 198b025e9a
commit b6365771ec
@@ -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);