msm: camera: smmu: add new flag to indicate Hw, CDM access

When set, buffers will be mapped within 32-bit region
address space and in patching, if Shared or CmdBUffer is
not set for such buffers - patch the value with right shift
by 8. kmd does as below.

Map:
  Shared or CmdBuffer : Mapped within 32bit.
  HwAndCDMOrShared    : Mapped within 32bit
  others(HwAccess)    : Mapped within 40bit
Patching:
  Shared or CmdBuffer : as is
  HwAndCDMOrShared    : iova >> 8
  others (HwAccess)   : iova >> 8

Shared/CmdBuffer takes precedence over HwAndCDMOrShared.

CRs-Fixed: 3128094
Change-Id: Ifd9f5beaf2659f77544cd0722ef7f60d6c0684a7
Signed-off-by: Pavan Kumar Chilamkurthi <quic_pchilamk@quicinc.com>
This commit is contained in:
Pavan Kumar Chilamkurthi
2022-02-10 07:45:56 -08:00
zatwierdzone przez Camera Software Integration
rodzic cd2c6d0ab8
commit 3ea1c2ad59
3 zmienionych plików z 13 dodań i 5 usunięć

Wyświetl plik

@@ -884,7 +884,8 @@ static int cam_mem_util_map_hw_va(uint32_t flags,
/* If 36-bit enabled, check for ICP cmd buffers and map them within the shared region */
if (cam_smmu_is_expanded_memory() &&
cam_smmu_supports_shared_region(mmu_hdls[i]) &&
(flags & CAM_MEM_FLAG_CMD_BUF_TYPE))
((flags & CAM_MEM_FLAG_CMD_BUF_TYPE) ||
(flags & CAM_MEM_FLAG_HW_AND_CDM_OR_SHARED)))
region = CAM_SMMU_REGION_SHARED;
if (flags & CAM_MEM_FLAG_PROTECTED_MODE)