msm: camera: icp: Add support for synx signaling

Add support to map global sync and hw mutex memory for ICP.
Share the region information with FW over GP registers.

CRs-Fixed: 3351015
Change-Id: Ie7a6af40ffd922ae89d64205787e3c656a007c49
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
This commit is contained in:
Karthik Anantha Ram
2022-11-02 20:52:22 -07:00
committed by Camera Software Integration
parent 0745a9ea41
commit 8f5c061dc5
5 changed files with 214 additions and 53 deletions

View File

@@ -730,6 +730,16 @@ int cam_hfi_resume(struct hfi_mem_info *hfi_mem)
cam_io_w_mb((uint32_t)hfi_mem->fw_uncached.len,
icp_base + HFI_REG_FWUNCACHED_REGION_SIZE);
cam_io_w_mb((uint32_t)hfi_mem->global_sync.iova,
icp_base + HFI_REG_FWUNCACHED_GLOBAL_SYNC_IOVA);
cam_io_w_mb((uint32_t)hfi_mem->global_sync.len,
icp_base + HFI_REG_FWUNCACHED_GLOBAL_SYNC_LEN);
cam_io_w_mb((uint32_t)hfi_mem->hwmutex.iova,
icp_base + HFI_REG_DEVICE_HWMUTEX_IOVA);
cam_io_w_mb((uint32_t)hfi_mem->hwmutex.len,
icp_base + HFI_REG_DEVICE_HWMUTEX_SIZE);
CAM_DBG(CAM_HFI, "IO1 : [0x%x 0x%x] IO2 [0x%x 0x%x]",
hfi_mem->io_mem.iova, hfi_mem->io_mem.len,
hfi_mem->io_mem2.iova, hfi_mem->io_mem2.len);
@@ -746,6 +756,10 @@ int cam_hfi_resume(struct hfi_mem_info *hfi_mem)
hfi_mem->qtbl.iova, hfi_mem->qtbl.len,
hfi_mem->sfr_buf.iova, hfi_mem->sfr_buf.len);
CAM_DBG(CAM_HFI, "global sync : [0x%x 0x%x] hwmutex [0x%x 0x%x]",
hfi_mem->global_sync.iova, hfi_mem->global_sync.len,
hfi_mem->hwmutex.iova, hfi_mem->hwmutex.len);
return rc;
}
@@ -939,6 +953,14 @@ int cam_hfi_init(struct hfi_mem_info *hfi_mem, const struct hfi_ops *hfi_ops,
icp_base + HFI_REG_FWUNCACHED_REGION_IOVA);
cam_io_w_mb((uint32_t)hfi_mem->fw_uncached.len,
icp_base + HFI_REG_FWUNCACHED_REGION_SIZE);
cam_io_w_mb((uint32_t)hfi_mem->global_sync.iova,
icp_base + HFI_REG_FWUNCACHED_GLOBAL_SYNC_IOVA);
cam_io_w_mb((uint32_t)hfi_mem->global_sync.len,
icp_base + HFI_REG_FWUNCACHED_GLOBAL_SYNC_LEN);
cam_io_w_mb((uint32_t)hfi_mem->hwmutex.iova,
icp_base + HFI_REG_DEVICE_HWMUTEX_IOVA);
cam_io_w_mb((uint32_t)hfi_mem->hwmutex.len,
icp_base + HFI_REG_DEVICE_HWMUTEX_SIZE);
CAM_DBG(CAM_HFI, "IO1 : [0x%x 0x%x] IO2 [0x%x 0x%x]",
hfi_mem->io_mem.iova, hfi_mem->io_mem.len,
@@ -956,6 +978,10 @@ int cam_hfi_init(struct hfi_mem_info *hfi_mem, const struct hfi_ops *hfi_ops,
hfi_mem->qtbl.iova, hfi_mem->qtbl.len,
hfi_mem->sfr_buf.iova, hfi_mem->sfr_buf.len);
CAM_DBG(CAM_HFI, "global sync : [0x%x 0x%x] hwmutex [0x%x 0x%x]",
hfi_mem->global_sync.iova, hfi_mem->global_sync.len,
hfi_mem->hwmutex.iova, hfi_mem->hwmutex.len);
if (cam_presil_mode_enabled())
cam_hfi_presil_setup(hfi_mem);