msm: camera: icp: Optimize FW uncached region for ICP

Allocate memory based on what is configured to FW. Avoid
hardcoded allocations, thereby reducing the memory
footprint. The change also updates size check for a SMMU
mapping, if the size of the buffer is beyond the assigned
va range fail the mapping.

CRs-Fixed: 3477543
Change-Id: Idfdce7febfe6624db33ff466b978207e96d4a902
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
This commit is contained in:
Karthik Anantha Ram
2023-04-24 14:32:47 -07:00
committed by Camera Software Integration
parent 99ce2fb196
commit 571d057caa
4 changed files with 50 additions and 61 deletions

View File

@@ -928,7 +928,7 @@ int cam_hfi_init(int client_handle, struct hfi_mem_info *hfi_mem,
qtbl_hdr = &qtbl->q_tbl_hdr;
qtbl_hdr->qtbl_version = 0xFFFFFFFF;
qtbl_hdr->qtbl_size = sizeof(struct hfi_qtbl);
qtbl_hdr->qtbl_qhdr0_offset = sizeof(struct hfi_qtbl_hdr);
qtbl_hdr->qtbl_qhdr0_offset = offsetof(struct hfi_qtbl, q_hdr);
qtbl_hdr->qtbl_qhdr_size = sizeof(struct hfi_q_hdr);
qtbl_hdr->qtbl_num_q = ICP_HFI_NUMBER_OF_QS;
qtbl_hdr->qtbl_num_active_q = ICP_HFI_NUMBER_OF_QS;