msm: camera: common: Optimize cam context memory
In current implementation, cam_ctx_req has a array of hw_update_entries, in_map_entries and out_map_entries. Each context has array of N requests. Memory for all contexts is allocated during probe. This causes a huge memory remaining unutilized. This commit moves the memory allocation to context acquire time and freeing this memory during context release. In place of using array, now dynamic allocation is used. A top level calculation shows a memory reduction of around 2M- 2.5M with this change including all the camera drivers. CRs-Fixed: 2830502 Change-Id: Id63cf2a52272e2a419704dc95100694e384330c3 Signed-off-by: Gaurav Jindal <gjindal@codeaurora.org>
Cette révision appartient à :

révisé par
Gerrit - the friendly Code Review server

Parent
c6b2796833
révision
1a5797c6a8
@@ -1729,6 +1729,9 @@ int cam_custom_dev_context_init(struct cam_custom_context *ctx,
|
||||
return rc;
|
||||
}
|
||||
|
||||
ctx_base->max_hw_update_entries = CAM_CTX_CFG_MAX;
|
||||
ctx_base->max_in_map_entries = CAM_CTX_CFG_MAX;
|
||||
ctx_base->max_out_map_entries = CAM_CTX_CFG_MAX;
|
||||
/* link camera context with custom HW context */
|
||||
ctx_base->state_machine = cam_custom_dev_ctx_top_state_machine;
|
||||
ctx_base->ctx_priv = ctx;
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur