From fec34e29a50365a3421a81536efbaa97885c390d Mon Sep 17 00:00:00 2001 From: Xiaojie Liu Date: Thu, 24 Feb 2022 19:26:55 +0800 Subject: [PATCH] msm: camera: icp: fix memory overflow to slove ramdump increase flush_req_pending's number to slove memory overflow CRs-Fixed: 05724712 Mot-CRs-fixed: (CR) Signed-off-by: Xiaojie Liu Change-Id: Ifab545c0705cf18f3c479e14e6d66f815aac4f60 Reviewed-on: https://gerrit.mot.com/2200505 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Zilong Zhang Reviewed-by: Lei Wang Reviewed-by: Reviewed-by: Zhuoran Xu Submit-Approved: Jira Key --- drivers/cam_core/cam_hw_mgr_intf.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/cam_core/cam_hw_mgr_intf.h b/drivers/cam_core/cam_hw_mgr_intf.h index 2b56d21b20be..22864250ca67 100644 --- a/drivers/cam_core/cam_hw_mgr_intf.h +++ b/drivers/cam_core/cam_hw_mgr_intf.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022. Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef _CAM_HW_MGR_INTF_H_ @@ -26,6 +27,12 @@ /* Maximum reg dump cmd buffer entries in a context */ #define CAM_REG_DUMP_MAX_BUF_ENTRIES 10 +/* + * This value should align with MAX requests supported by + * hw modules like ICP, IFE, JPEG etc. + */ +#define CAM_MAX_FLUSH_REQS 40 + /** * enum cam_context_dump_id - * context dump type @@ -289,9 +296,9 @@ struct cam_hw_config_args { struct cam_hw_flush_args { void *ctxt_to_hw_map; uint32_t num_req_pending; - void *flush_req_pending[20]; + void *flush_req_pending[CAM_MAX_FLUSH_REQS]; uint32_t num_req_active; - void *flush_req_active[20]; + void *flush_req_active[CAM_MAX_FLUSH_REQS]; enum flush_type_t flush_type; uint32_t last_flush_req; };