msm: camera: memmgr: Add provision for heap selection

Currently, userland can only choose whether to allocate memory as
cached/uncached if it's a protected buffer, ubwc_p buffer, etc.
This change provides some more granularity in terms of heap selection.
One could now force an allocation from the system heap or
try a dedicated heap. The change also provides heap capability info
to userland as part of the query caps call.

CRs-Fixed: 3584481
Change-Id: Id4c92fd64d975f761e7dd4cecca8453dd09b039f
Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
这个提交包含在:
Karthik Anantha Ram
2023-08-14 13:33:05 -07:00
提交者 Camera Software Integration
父节点 1dd093a770
当前提交 594b59a2df
修改 4 个文件,包含 53 行新增20 行删除

查看文件

@@ -371,7 +371,11 @@ struct cam_req_mgr_link_properties {
#define CAM_MEM_FLAG_EVA_NOPIXEL (1<<15)
#define CAM_MEM_FLAG_HW_AND_CDM_OR_SHARED (1<<16)
#define CAM_MEM_FLAG_UBWC_P_HEAP (1<<17)
/* Allocation forced to camera heap */
#define CAM_MEM_FLAG_USE_CAMERA_HEAP_ONLY (1<<18)
/* Allocation forced to system heap */
#define CAM_MEM_FLAG_USE_SYS_HEAP_ONLY (1<<19)
#define CAM_MEM_MMU_MAX_HANDLE 16
@@ -434,6 +438,7 @@ struct cam_req_mgr_link_properties {
* Feature mask returned in query_cap
*/
#define CAM_REQ_MGR_MEM_UBWC_P_HEAP_SUPPORTED BIT(0)
#define CAM_REQ_MGR_MEM_CAMERA_HEAP_SUPPORTED BIT(1)
/**
* struct cam_req_mgr_query_cap