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>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
c6b2796833
commit
1a5797c6a8
@@ -166,12 +166,11 @@ struct cam_isp_ctx_irq_ops {
|
||||
*/
|
||||
struct cam_isp_ctx_req {
|
||||
struct cam_ctx_request *base;
|
||||
struct cam_hw_update_entry cfg[CAM_ISP_CTX_CFG_MAX];
|
||||
struct cam_hw_update_entry *cfg;
|
||||
uint32_t num_cfg;
|
||||
struct cam_hw_fence_map_entry fence_map_out
|
||||
[CAM_ISP_CTX_RES_MAX];
|
||||
struct cam_hw_fence_map_entry *fence_map_out;
|
||||
uint32_t num_fence_map_out;
|
||||
struct cam_hw_fence_map_entry fence_map_in[CAM_ISP_CTX_RES_MAX];
|
||||
struct cam_hw_fence_map_entry *fence_map_in;
|
||||
uint32_t num_fence_map_in;
|
||||
uint32_t num_acked;
|
||||
uint32_t num_deferred_acks;
|
||||
|
Reference in New Issue
Block a user